/* ─── Siemens Brand Tokens ──────────────────────────────────── */
:root {
  --teal:        #009999;
  --teal-dark:   #007777;
  --navy:        #000028;
  --white:       #ffffff;
  --bg-light:    #f4f8f8;
  --text:        #1a1a2e;
  --muted:       #65657a;
  --border:      #e4e4ef;
  --radius-card: 20px;
  --radius-btn:  10px;
  --shadow-card: 0 12px 40px rgba(0, 0, 40, 0.22);
}

/* ─── Reset & Base ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
               'Helvetica Neue', Arial, sans-serif;
  background: linear-gradient(160deg, var(--navy) 0%, #003050 100%);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 20px 16px 48px;
}

#app { width: 100%; max-width: 390px; }

/* ─── Pass Card ─────────────────────────────────────────────── */
.pass-card {
  background: var(--white);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

/* Header */
.pass-header { background: var(--navy); padding: 20px 22px 14px; }

.pass-header-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.siemens-logo {
  display: block;
  height: 24px;
  width: auto;
  filter: brightness(0) invert(1);
}

.header-sep    { color: rgba(255,255,255,0.3); font-size: 18px; line-height: 1; user-select: none; }
.program-label { color: rgba(255,255,255,0.85); font-size: 11px; font-weight: 600; letter-spacing: 1.8px; text-transform: uppercase; }

.conference-tag {
  display: inline-block;
  background: var(--teal);
  color: var(--white);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  padding: 4px 12px;
  border-radius: 20px;
}

/* ─── Tab Navigation ────────────────────────────────────────── */
.pass-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 2px solid var(--border);
  background: var(--white);
}

.tab-btn {
  padding: 12px 0;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color 0.15s, border-color 0.15s;
  letter-spacing: 0.2px;
}

.tab-btn:hover  { color: var(--teal); }
.tab-btn.active { color: var(--navy); border-bottom-color: var(--teal); }

/* ─── Tab Panels ────────────────────────────────────────────── */
.tab-panel { display: block; }
.tab-panel.hidden { display: none; }

/* ─── Pass Body ─────────────────────────────────────────────── */
.pass-body {
  padding: 28px 22px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.attendee-avatar {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal) 0%, var(--teal-dark) 100%);
  color: var(--white);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -1px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  flex-shrink: 0;
}

.attendee-name    { font-size: 26px; font-weight: 700; color: var(--navy); line-height: 1.15; margin: 0 0 8px; }
.attendee-role    { font-size: 14px; font-weight: 600; color: var(--teal); margin: 0 0 4px; }
.attendee-company { font-size: 13px; color: var(--muted); margin: 0 0 24px; }

/* QR */
.qr-section {
  background: var(--bg-light);
  border-radius: 14px;
  padding: 16px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

#qrcode canvas, #qrcode img { display: block; border-radius: 6px; }
.qr-hint { margin: 0; font-size: 11px; color: var(--muted); letter-spacing: 0.3px; }

/* ─── Actions ───────────────────────────────────────────────── */
.pass-actions {
  padding: 16px 22px 14px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  border-top: 1px solid var(--border);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  padding: 13px 18px;
  border: none;
  border-radius: var(--radius-btn);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition: opacity 0.15s ease, transform 0.1s ease;
}

.btn:hover  { opacity: 0.88; }
.btn:active { opacity: 0.80; transform: scale(0.97); }

.btn-icon { width: 18px; height: 18px; flex-shrink: 0; }

.btn-contacts { background: var(--navy);  color: var(--white); }
.btn-share    { background: var(--teal);  color: var(--white); }
.btn-gwallet  { background: #f0f1f4; color: var(--text); border: 1px solid var(--border); }
.btn-linkedin { background: #0a66c2; color: var(--white); }

/* ─── Footer ────────────────────────────────────────────────── */
.pass-footer {
  background: var(--bg-light);
  border-top: 1px solid var(--border);
  padding: 12px 22px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}

/* ─── Schedule Tab ──────────────────────────────────────────── */
.schedule-header {
  padding: 14px 22px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.schedule-location {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

/* Day Switcher */
.day-switcher {
  display: flex;
  background: var(--bg-light);
  border-radius: 8px;
  padding: 3px;
  gap: 2px;
}

.day-btn {
  padding: 6px 16px;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  border: none;
  background: none;
  border-radius: 6px;
  cursor: pointer;
  color: var(--muted);
  transition: all 0.15s;
}

.day-btn.active {
  background: var(--white);
  color: var(--navy);
  box-shadow: 0 1px 4px rgba(0,0,40,0.1);
}

/* Day Schedule */
.day-schedule { padding-bottom: 4px; }
.day-schedule.hidden { display: none; }

.day-label {
  padding: 12px 22px 8px;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

/* Sessions */
.sessions { display: flex; flex-direction: column; }

.session {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 0 10px;
  padding: 10px 22px;
  border-bottom: 1px solid var(--border);
  transition: background 0.1s;
}

.session:last-child { border-bottom: none; }
.session:hover      { background: #fafafe; }

/* Parallel sessions (same time slot) — slightly indented to indicate grouping */
.session-parallel {
  padding-top: 4px;
  padding-bottom: 10px;
  background: #fafafe;
  border-bottom-style: dashed;
}

.session-time {
  font-size: 12px;
  font-weight: 700;
  color: var(--teal);
  padding-top: 3px;
  white-space: nowrap;
  line-height: 1.3;
}

.session-parallel .session-time { opacity: 0; } /* hide duplicate time for parallel sessions */

.session-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 5px;
  line-height: 1.35;
}

.session-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.session-room {
  font-size: 11px;
  color: var(--muted);
}

/* Session Type Badges */
.badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  flex-shrink: 0;
}

.badge-keynote    { background: #e0f5f5; color: var(--teal-dark); }
.badge-workshop   { background: #e8e8f0; color: var(--navy); }
.badge-panel      { background: #ede9fe; color: #5b21b6; }
.badge-networking { background: #dcfce7; color: #166534; }
.badge-break      { background: #f3f4f6; color: var(--muted); }
.badge-social     { background: #fff7ed; color: #c2410c; }
.badge-activity   { background: #dbeafe; color: #1d4ed8; }
.badge-ceremony   { background: #fef9c3; color: #854d0e; }

/* ─── Loading State ─────────────────────────────────────────── */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 80px 0 40px;
  color: rgba(255,255,255,0.75);
  font-size: 14px;
}

.loading-spinner {
  width: 44px;
  height: 44px;
  border: 3px solid rgba(255,255,255,0.15);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Error State ───────────────────────────────────────────── */
.error-state { display: flex; justify-content: center; padding-top: 40px; }

.error-card {
  background: var(--white);
  border-radius: var(--radius-card);
  padding: 44px 28px;
  text-align: center;
  box-shadow: var(--shadow-card);
  max-width: 360px;
  width: 100%;
}

.error-icon     { font-size: 52px; margin-bottom: 20px; }
.error-card h2  { font-size: 22px; color: var(--navy); margin: 0 0 10px; }
.error-card p   { font-size: 14px; color: var(--muted); line-height: 1.6; margin: 0 0 6px; }

/* ─── Toast ─────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--navy);
  color: var(--white);
  padding: 11px 22px;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 6px 20px rgba(0,0,40,0.35);
  z-index: 200;
  white-space: nowrap;
  animation: toastIn 0.25s ease;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(8px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0);   }
}

/* ─── Modal ──────────────────────────────────────────────────── */
.modal {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}

.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,28,0.75); }

.modal-box {
  position: relative; z-index: 1;
  background: var(--white);
  border-radius: var(--radius-card);
  padding: 32px 24px 24px;
  max-width: 360px;
  width: 100%;
  box-shadow: var(--shadow-card);
}

.modal-box h3  { font-size: 20px; color: var(--navy); margin: 0 0 14px; }
.modal-box p   { font-size: 14px; color: var(--muted); line-height: 1.65; margin: 0 0 12px; }
.modal-box ol  { font-size: 14px; color: var(--text); line-height: 1.8; padding-left: 18px; margin: 0 0 22px; }

/* ─── Utility ───────────────────────────────────────────────── */
.hidden { display: none !important; }

@supports (padding: env(safe-area-inset-bottom)) {
  body { padding-bottom: calc(48px + env(safe-area-inset-bottom)); }
}

/* ─── Dark Mode ─────────────────────────────────────────────── */
[data-theme="dark"] {
  --white:       #1e1e3a;
  --bg-light:    #141428;
  --text:        #dcdcf0;
  --muted:       #8888aa;
  --border:      #2e2e52;
  --shadow-card: 0 12px 40px rgba(0,0,0,0.55);
}
[data-theme="dark"] body { background: linear-gradient(160deg,#000018 0%,#001830 100%); }
[data-theme="dark"] .session:hover      { background: #242440; }
[data-theme="dark"] .session-parallel   { background: #1a1a34; }
[data-theme="dark"] .day-btn.active     { background: #2a2a4a; }
[data-theme="dark"] .btn-gwallet        { background: #2a2a48; color: var(--text); border-color: var(--border); }
[data-theme="dark"] .speaker-toggle:hover { background: var(--bg-light); }
[data-theme="dark"] .modal-box          { background: var(--white); }
[data-theme="dark"] .error-card         { background: var(--white); }
[data-theme="dark"] .badge-keynote    { background: #003333; color: #33cccc; }
[data-theme="dark"] .badge-workshop   { background: #1a1a40; color: #a0a0cc; }
[data-theme="dark"] .badge-panel      { background: #2a1a4e; color: #c4b5fd; }
[data-theme="dark"] .badge-networking { background: #0f2a1a; color: #4ade80; }
[data-theme="dark"] .badge-break      { background: #252530; color: #9090a8; }
[data-theme="dark"] .badge-social     { background: #2a1a0a; color: #fb923c; }
[data-theme="dark"] .badge-activity   { background: #0a1a2e; color: #60a5fa; }
[data-theme="dark"] .badge-ceremony   { background: #2a200a; color: #fbbf24; }
[data-theme="dark"] .bio-name         { color: var(--text); }

/* ─── Dark Mode Toggle ──────────────────────────────────────── */
.dark-toggle {
  margin-left: auto;
  width: 30px; height: 30px;
  flex-shrink: 0;
  background: rgba(255,255,255,0.1);
  border: none; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: #fff;
  transition: background 0.15s;
}
.dark-toggle:hover { background: rgba(255,255,255,0.22); }
.dark-toggle svg   { width: 15px; height: 15px; pointer-events: none; }

/* ─── Countdown ─────────────────────────────────────────────── */
.countdown {
  margin-top: 12px;
  padding: 10px 14px;
  background: rgba(255,255,255,0.07);
  border-radius: 10px;
}
.countdown-label {
  font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 1.2px;
  color: rgba(255,255,255,0.5); margin-bottom: 7px;
}
.countdown-digits { display: flex; align-items: flex-end; gap: 2px; }
.countdown-digits > span { display: flex; flex-direction: column; align-items: center; flex: 1; }
.countdown-digits strong {
  font-size: 22px; font-weight: 700; color: #fff; line-height: 1;
  font-variant-numeric: tabular-nums;
}
.countdown-digits em {
  font-style: normal; font-size: 9px;
  text-transform: uppercase; letter-spacing: 0.8px;
  color: rgba(255,255,255,0.4); margin-top: 3px;
}
.cd-sep { font-size: 18px; font-weight: 300; color: rgba(255,255,255,0.25); padding-bottom: 12px; flex: none !important; }
.countdown-live { font-size: 13px; font-weight: 600; color: var(--teal); text-align: center; padding: 4px 0; }

/* ─── ICS Button ────────────────────────────────────────────── */
.ics-btn {
  margin-left: auto;
  padding: 3px 7px;
  background: none; border: 1px solid var(--border); border-radius: 5px;
  cursor: pointer; color: var(--muted);
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 10px; font-family: inherit; font-weight: 600;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap; flex-shrink: 0;
}
.ics-btn:hover { color: var(--teal); border-color: var(--teal); }
.ics-btn svg   { width: 11px; height: 11px; flex-shrink: 0; }

/* ─── Speaker Bio Card ──────────────────────────────────────── */
.speaker-toggle {
  width: 100%; background: none; border: none; border-radius: 8px;
  padding: 6px 8px; margin-top: 6px;
  cursor: pointer; font-family: inherit; text-align: left;
  transition: background 0.12s;
}
.speaker-toggle:hover { background: var(--bg-light); }
.speaker-preview-inner { display: flex; align-items: center; gap: 8px; }
.speaker-av {
  width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(135deg, var(--teal) 0%, var(--teal-dark) 100%);
  color: #fff; font-size: 9px; font-weight: 700; letter-spacing: 0.3px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.speaker-preview-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.speaker-preview-text strong { font-size: 12px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.speaker-preview-text span   { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.speaker-chevron { width: 14px; height: 14px; color: var(--muted); margin-left: auto; flex-shrink: 0; transition: transform 0.2s; }
.speaker-toggle[aria-expanded="true"] .speaker-chevron { transform: rotate(180deg); }

/* Multi-speaker chips */
.speaker-chips { display: flex; gap: 5px; flex-wrap: wrap; flex: 1; }
.speaker-chip  { display: flex; align-items: center; gap: 4px; background: var(--bg-light); border-radius: 20px; padding: 2px 7px 2px 3px; }
.speaker-chip .speaker-av { width: 20px; height: 20px; font-size: 7px; }
.speaker-chip span { font-size: 11px; color: var(--text); font-weight: 500; white-space: nowrap; }

/* Bio card */
.speaker-bio {
  margin-top: 4px; padding: 10px 12px;
  background: var(--bg-light); border-radius: 8px;
  border-left: 3px solid var(--teal);
}
.speaker-bio p { font-size: 12px; color: var(--text); line-height: 1.6; margin: 0 0 8px; }
.bio-links { display: flex; gap: 6px; flex-wrap: wrap; }
.bio-link  { font-size: 11px; font-weight: 600; color: var(--teal); text-decoration: none; padding: 3px 8px; background: rgba(0,153,153,0.09); border-radius: 4px; transition: background 0.15s; }
.bio-link:hover { background: rgba(0,153,153,0.2); }
.bio-section { padding-bottom: 10px; margin-bottom: 10px; border-bottom: 1px solid var(--border); }
.bio-section:last-child { padding-bottom: 0; margin-bottom: 0; border-bottom: none; }
.bio-name { font-size: 12px; font-weight: 700; color: var(--navy); margin-bottom: 4px; }
[data-theme="dark"] .bio-name { color: var(--text); }

/* ─── Contact Card (scan view) ──────────────────────────────── */
.contact-body {
  padding: 20px 22px 18px;
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
.contact-scan-hint {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 600;
  color: var(--teal); letter-spacing: 0.3px;
  background: rgba(0,153,153,0.08); padding: 5px 12px;
  border-radius: 20px; margin-bottom: 4px;
}

/* Modal URL box */
.modal-url-box {
  background: var(--bg-light); border: 1px solid var(--border);
  border-radius: 8px; padding: 10px 14px;
  font-size: 14px; font-weight: 700; color: var(--teal);
  text-align: center; letter-spacing: 0.3px;
  margin: 12px 0 16px; font-family: monospace;
}
.modal-box ol { font-size: 13px; color: var(--text); line-height: 1.9; padding-left: 18px; margin: 0 0 14px; }

/* ─── Live Effect Animations ────────────────────────────────── */
@keyframes shake {
  0%,100% { transform: translateX(0); }
  10%,30%  { transform: translateX(-7px) rotate(-0.8deg); }
  20%,40%  { transform: translateX(7px)  rotate(0.8deg); }
  50%,70%  { transform: translateX(-4px); }
  60%,80%  { transform: translateX(4px); }
  90%      { transform: translateX(-2px); }
}
.effect-shake { animation: shake 0.85s ease; }

@keyframes glow-pulse {
  0%,100% { box-shadow: var(--shadow-card); }
  40%     { box-shadow: 0 0 0 4px rgba(0,153,153,0.4), 0 0 60px rgba(0,153,153,0.5); }
}
.effect-glow { animation: glow-pulse 1.4s ease 3; }

@keyframes confetti-fall {
  to { transform: translateY(105vh) rotate(720deg); opacity: 0; }
}
