@import url('tokens.css');
@import url('components.css');
@import url('shell.css');
/* ============================================================
   MAS SUITE — Hoofdstylesheet
   Kleuren: #2F2C7B (blauw) | #A36345 (brons) | #CBD2DC (grijs)
   ============================================================ */

:root {
  --mas-blue: #2F2C7B;
  --mas-bronze: #A36345;
  --mas-grey: #CBD2DC;
  --mas-bg: #f4f6fa;
}

/* ---------- Basis ---------- */
html, body {
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', sans-serif;
  background: var(--mas-bg);
  color: #222;
}
body { overflow-x: hidden; }

/* ============================================================
   POPUP (extension action)
   ============================================================ */
#popup-body {
  width: 280px;
  padding: 0;
  background: #fff;
  overflow: hidden;
}
.popup-header {
  background: #fff;
  padding: 18px 16px 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-bottom: 1px solid #eee;
}
.popup-logo {
  max-width: 200px;
  max-height: 80px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}
.popup-actions {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.popup-hint {
  font-size: 11px;
  color: #888;
  text-align: center;
  margin-top: 4px;
}

/* ============================================================
   SPLASH SCREEN
   ============================================================ */
#splash-screen {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #fff 0%, #f4f6fa 100%);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease;
}
.splash-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  animation: splashFadeIn 0.6s ease;
}
@keyframes splashFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.splash-logo {
  max-width: 320px;
  max-height: 140px;
  width: auto;
  height: auto;
  object-fit: contain;
  cursor: pointer;
  filter: drop-shadow(0 4px 12px rgba(47,44,123,0.15));
}

/* === Splash atoom animatie (SVG, onder het MAS-logo) === */
.splash-atom-anim {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-top: -8px;
}
.splash-atom-anim svg {
  display: block;
  filter: drop-shadow(0 2px 6px rgba(192,123,74,0.35));
}
/* Banen — dunne bronze ellipses, statisch */
.atom-orbit {
  fill: none;
  stroke: var(--mas-bronze);
  stroke-width: 1.2;
  stroke-opacity: 0.45;
}
/* Pulserende kern */
.atom-nucleus {
  fill: var(--mas-bronze);
  animation: atomPulse 1.6s ease-in-out infinite;
  transform-origin: center;
}
@keyframes atomPulse {
  0%, 100% { r: 5; opacity: 1; }
  50%      { r: 7; opacity: 0.7; }
}
/* Elektronen — bewegen langs hun baan via rotate + translateX */
.atom-electron {
  fill: var(--mas-blue);
  transform-origin: center;
}
.atom-electron.e1 { animation: atomOrbit1 2.2s linear infinite; }
.atom-electron.e2 { animation: atomOrbit2 2.2s linear infinite; }
.atom-electron.e3 { animation: atomOrbit3 2.2s linear infinite; }

/* Drie banen (0°, 60°, 120°) — elektron volgt elliptisch pad door rotate + translate */
@keyframes atomOrbit1 {
  from { transform: rotate(0deg)   translateX(40px) rotate(0deg); }
  to   { transform: rotate(360deg) translateX(40px) rotate(-360deg); }
}
@keyframes atomOrbit2 {
  from { transform: rotate(60deg)   translateX(40px) rotate(-60deg); }
  to   { transform: rotate(420deg)  translateX(40px) rotate(-420deg); }
}
@keyframes atomOrbit3 {
  from { transform: rotate(120deg)  translateX(40px) rotate(-120deg); }
  to   { transform: rotate(480deg)  translateX(40px) rotate(-480deg); }
}
/* Note: deze keyframes geven cirkelvormige beweging. Voor echt elliptisch
   gebruiken we een lichte verticaal-skewing in scaleY van de wrapping group */

.splash-poweredby {
  font-size: 11px;
  font-weight: 600;
  color: var(--mas-bronze);
  letter-spacing: 3px;
  text-transform: uppercase;
  opacity: 0.85;
}
.splash-poweredby strong {
  color: var(--mas-blue);
  font-weight: 800;
}

/* Oude .splash-atom-wrap CSS (wordt niet meer gebruikt maar laat staan voor evt fallback) */
.splash-atom-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
}
.splash-atom {
  font-size: 100px;
  line-height: 1;
  animation: atomSpin 4s linear infinite;
  filter: drop-shadow(0 4px 16px rgba(192,123,74,0.4));
}
@keyframes atomSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
.splash-mas-tag {
  font-size: 38px;
  font-weight: 800;
  color: var(--mas-blue);
  letter-spacing: 6px;
  margin-top: 4px;
}
.splash-progress {
  width: 260px;
  height: 4px;
  background: var(--mas-grey);
  border-radius: 2px;
  overflow: hidden;
}
.splash-progress-bar {
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--mas-blue), var(--mas-bronze));
  transform: translateX(-100%);
  animation: loadBar 1.5s ease-out forwards;
}
@keyframes loadBar {
  to { transform: translateX(0); }
}
#loading-text {
  font-size: 12px;
  font-weight: 600;
  color: var(--mas-blue);
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* ============================================================
   HEADER
   ============================================================ */
header {
  background: var(--mas-blue);
  height: 70px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  border-bottom: 3px solid var(--mas-bronze);
  flex-shrink: 0;
  gap: 14px;
}
.header-logo-wrapper {
  background: #fff;
  padding: 4px 10px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  height: 46px;
  cursor: pointer;
  flex-shrink: 0;
}
.header-mini-logo-static {
  height: 36px;
  max-width: 110px;
  width: auto;
  object-fit: contain;
}
.header-content {
  flex: 1;
  position: relative;
  height: 100%;
  overflow: hidden;
  min-width: 0;
}
.fade-slide {
  position: absolute;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-transform: uppercase;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 2px;
  opacity: 0;
  animation: fadeCycle 12s infinite linear;
  visibility: hidden;
}
.slogan-highlight { color: #fff; }
@keyframes fadeCycle {
  0%, 100% { opacity: 0; visibility: hidden; }
  5%, 28%  { opacity: 1; visibility: visible; }
  33%      { opacity: 0; visibility: hidden; }
}
.fade-slide:nth-child(1) { animation-delay: 0s; }
.fade-slide:nth-child(2) { animation-delay: 4s; }
.fade-slide:nth-child(3) { animation-delay: 8s; }

/* Als de 3e regel roterende MAS-slogans toont: ander lettertype */
.fade-slide.header-mas-slogan {
  text-transform: none;
  letter-spacing: 0.3px;
  font-weight: 500;
  font-size: 13px;
  font-style: italic;
  padding: 0 40px;
  text-align: center;
}

.mute-btn {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.4);
  color: #fff;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.mute-btn:hover { background: rgba(255,255,255,0.1); }

/* ============================================================
   NEWS TICKER & DATE BAR
   ============================================================ */
.news-ticker {
  background: var(--mas-grey);
  height: 30px;
  display: flex;
  align-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--mas-blue);
  flex-shrink: 0;
}
.ticker-label {
  background: var(--mas-blue);
  color: #fff;
  padding: 0 12px;
  height: 100%;
  display: flex;
  align-items: center;
  font-size: 10px;
  font-weight: bold;
  letter-spacing: 1px;
  flex-shrink: 0;
}
.ticker-wrap {
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
}
.ticker-move {
  display: inline-block;
  padding-left: 100%;
  white-space: nowrap;
  animation: ticker-animation 90s linear infinite;
  font-size: 12px;
  font-weight: bold;
  color: var(--mas-blue);
}
@keyframes ticker-animation {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

.date-bar {
  background: #f8f9fa;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--mas-blue);
  border-bottom: 1px solid #ddd;
  flex-shrink: 0;
}

/* ============================================================
   CONTENT WRAPPER
   ============================================================ */
.popup-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
}
.main-content-hidden { display: none; }

.content-wrapper {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  padding-bottom: 60px;
  box-sizing: border-box;
}

/* ============================================================
   LAUNCHPAD – APP GRID & CARDS
   ============================================================ */
.menu-container { padding: 24px; }

.app-grid {
  display: block;
  max-width: 1100px;
  margin: 0 auto;
}

.app-category-header {
  font-size: 12px;
  font-weight: 700;
  color: var(--mas-bronze);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin: 24px 0 12px 4px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--mas-grey);
}
.app-category-header:first-child { margin-top: 0; }

.app-category-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 8px;
}

.app-card {
  background: #fff;
  border: 1px solid var(--mas-grey);
  border-radius: 12px;
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
  user-select: none;
}
.app-card:hover:not(.disabled) {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(47,44,123,0.15);
  border-color: var(--mas-bronze);
}
.app-card.disabled {
  opacity: 0.55;
  cursor: not-allowed;
  background: #f5f5f5;
}
.app-icon { font-size: 36px; margin-bottom: 10px; }
.app-title {
  font-weight: 700;
  color: var(--mas-blue);
  font-size: 15px;
  margin-bottom: 6px;
}
.app-desc { font-size: 12px; color: #666; line-height: 1.4; }

/* Favoriet-ster op een appkaart */
.app-card { position: relative; }
.app-fav-btn {
  position: absolute;
  top: 8px; right: 10px;
  background: transparent;
  border: none;
  font-size: 18px;
  line-height: 1;
  color: #c9ced8;
  cursor: pointer;
  padding: 2px;
  transition: transform 0.12s ease, color 0.12s ease;
}
.app-fav-btn:hover { transform: scale(1.2); }
.app-fav-btn.is-fav { color: #E8A93C; }

/* Type-tegel (categorie) op het startscherm */
.app-type-tile {
  background: linear-gradient(135deg, #f3f4fb 0%, #eceaffe6 100%);
  border-color: var(--mas-blue);
}
.app-type-tile:hover:not(.disabled) { border-color: var(--mas-bronze); }
.app-type-tile .app-icon { font-size: 42px; }
.app-type-tile .app-title { font-size: 16px; }

/* Terug-balk in de categorie-weergave */
.cat-back-bar { display: flex; align-items: center; gap: 12px; }
.cat-back-btn {
  background: var(--mas-blue);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  cursor: pointer;
}
.cat-back-btn:hover { background: var(--mas-bronze); }

/* ============================================================
   APP OVERLAY (iframe launcher)
   ============================================================ */
.app-overlay {
  position: fixed;
  inset: 0;
  background: #fff;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}
.app-overlay.active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}
.app-overlay.hidden { display: none; }

.app-overlay-header {
  background: var(--mas-blue);
  color: #fff;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: 2px solid var(--mas-bronze);
  flex-shrink: 0;
}
.app-overlay-close {
  background: transparent;
  border: 1px solid #fff;
  color: #fff;
  padding: 6px 14px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  font-weight: bold;
}
.app-overlay-close:hover {
  background: var(--mas-bronze);
  border-color: var(--mas-bronze);
}
.app-overlay-title {
  font-size: 13px;
  font-weight: bold;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.app-frame {
  flex: 1;
  width: 100%;
  border: none;
  background: #fff;
}

/* ============================================================
   FORM ELEMENTS (voor apps)
   ============================================================ */
h2 {
  font-size: 0.85rem;
  color: var(--mas-bronze);
  border-bottom: 2px solid var(--mas-grey);
  padding-bottom: 5px;
  margin-top: 15px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
input[type="text"], select {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  margin-bottom: 10px;
  box-sizing: border-box;
  font-family: inherit;
}

.collapsible {
  background: #fff;
  color: var(--mas-blue);
  cursor: pointer;
  padding: 10px;
  width: 100%;
  border: 1px solid var(--mas-grey);
  text-align: left;
  font-size: 13px;
  font-weight: bold;
  border-radius: 6px;
  margin-top: 5px;
  display: flex;
  justify-content: space-between;
}
.content { padding: 10px; display: none; background: #fff; border: 1px solid #eee; }

.primary-mas-btn {
  width: 100%;
  padding: 14px;
  background: var(--mas-bronze);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 800;
  cursor: pointer;
  margin-top: 0;
  font-size: 14px;
  letter-spacing: 1px;
  transition: background 0.15s ease, transform 0.1s ease;
}
.primary-mas-btn:hover { background: #8a5238; }
.primary-mas-btn:active { transform: scale(0.98); }

.selection-tools { margin-bottom: 10px; display: flex; gap: 8px; }
.tool-btn {
  background: var(--mas-grey);
  color: var(--mas-blue);
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: bold;
  cursor: pointer;
  user-select: none;
}
.tool-btn:hover { background: var(--mas-blue); color: #fff; }

.status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px;
  background: #fafbfd;
  border: 1px solid #ddd;
  border-radius: 4px;
  min-height: 40px;
}
/* Checkbox-labels binnen status-row → chip-stijl (zoals PS-Rapport) */
.status-row .cb-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 14px;
  font-size: 12px;
  color: #555;
  cursor: pointer;
  user-select: none;
  transition: all 0.15s;
  margin: 0;
}
.status-row .cb-label:hover {
  border-color: var(--mas-bronze);
  color: var(--mas-blue);
}
/* Verberg de werkelijke checkbox — chip-state via has() en :checked */
.status-row .cb-label input[type="checkbox"] {
  display: none;
}
.status-row .cb-label:has(input[type="checkbox"]:checked) {
  background: var(--mas-bronze);
  border-color: var(--mas-bronze);
  color: #fff;
  font-weight: 600;
}

/* === Project-filter-list (PS-Manager) — gegroepeerde nette lijst === */
#project-filter-list {
  max-height: 380px;
  overflow-y: auto;
  padding: 8px;
  background: #fafbfd;
  border: 1px solid #ddd;
  border-radius: 4px;
}
.project-group-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 10px;
  margin: 8px 0 4px 0;
  background: var(--mas-blue);
  color: #fff;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
}
.project-group-header:first-child { margin-top: 0; }
.project-group-title { text-transform: uppercase; }
.project-group-header .tool-btn.tool-link-group {
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.3);
  color: #fff;
  padding: 2px 8px;
  font-size: 10px;
  border-radius: 3px;
}
.project-group-header .tool-btn.tool-link-group:hover {
  background: var(--mas-bronze);
  border-color: var(--mas-bronze);
}

/* Project-checkboxes: nette regel-layout, niet meer plat zoals voorheen */
#project-filter-list .cb-label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  font-size: 13px;
  color: #333;
  cursor: pointer;
  border-radius: 3px;
  transition: background 0.1s;
}
#project-filter-list .cb-label:hover { background: #eef0f5; }
#project-filter-list .cb-label input[type="checkbox"] {
  accent-color: var(--mas-bronze);
  cursor: pointer;
  margin: 0;
}

/* ACTION CARDS */
.action-card {
  background: white;
  margin-bottom: 10px;
  padding: 12px;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  border-left: 6px solid var(--mas-grey);
  cursor: pointer;
}

/* Progress */
#progress-container {
  width: 100%;
  background: var(--mas-grey);
  border-radius: 4px;
  height: 6px;
  margin-top: 10px;
  overflow: hidden;
  display: none;
}
#progress-bar {
  height: 100%;
  width: 0%;
  background: var(--mas-bronze);
  transition: width 0.3s ease;
}

.btn-group { display: flex; gap: 10px; margin-top: 15px; }
.btn-export, .btn-pdf {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  color: white;
}
.btn-export { background: #217346; }
.btn-pdf    { background: #C43E3E; }

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  position: fixed;
  bottom: 0;
  width: 100%;
  background: var(--mas-blue);
  color: #fff;
  text-align: center;
  padding: 8px 0;
  font-size: 11px;
  border-top: 2px solid var(--mas-bronze);
  z-index: 50;
}

/* ============================================================
   EASTER EGG OVERLAY
   ============================================================ */
#mega-anim-overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at center, #1d2b4e 0%, #0a1530 70%, #050912 100%);
  z-index: 20000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
  overflow: hidden;
}
#mega-anim-overlay.active-overlay {
  opacity: 1;
  pointer-events: auto;
}

/* Achtergrondraster — subtiele lijnen */
.anim-grid {
  position: absolute;
  inset: -2px;
  background-image:
    linear-gradient(rgba(192,123,74,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(192,123,74,0.06) 1px, transparent 1px);
  background-size: 40px 40px;
  animation: gridPulse 4s ease-in-out infinite;
}
@keyframes gridPulse {
  0%, 100% { opacity: 0.4; }
  50%      { opacity: 0.85; }
}

/* Drijvende deeltjes */
.anim-particles span {
  position: absolute;
  width: 3px;
  height: 3px;
  background: var(--mas-bronze);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--mas-bronze);
  opacity: 0;
  animation: particleFloat 6s ease-in-out infinite;
}
.anim-particles span:nth-child(1) { left: 10%; top: 20%; animation-delay: 0.0s; }
.anim-particles span:nth-child(2) { left: 85%; top: 15%; animation-delay: 0.6s; }
.anim-particles span:nth-child(3) { left: 25%; top: 75%; animation-delay: 1.2s; }
.anim-particles span:nth-child(4) { left: 70%; top: 80%; animation-delay: 1.8s; }
.anim-particles span:nth-child(5) { left: 50%; top: 30%; animation-delay: 0.3s; }
.anim-particles span:nth-child(6) { left: 15%; top: 50%; animation-delay: 1.5s; }
.anim-particles span:nth-child(7) { left: 90%; top: 60%; animation-delay: 0.9s; }
.anim-particles span:nth-child(8) { left: 40%; top: 90%; animation-delay: 2.1s; }
.anim-particles span:nth-child(9) { left: 60%; top: 10%; animation-delay: 0.4s; }
.anim-particles span:nth-child(10){ left: 5%;  top: 85%; animation-delay: 1.0s; }
@keyframes particleFloat {
  0%   { opacity: 0; transform: translateY(20px) scale(0.5); }
  20%  { opacity: 1; }
  80%  { opacity: 1; }
  100% { opacity: 0; transform: translateY(-40px) scale(1.2); }
}

.anim-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  z-index: 1;
}

/* Fase 1: Tagline-flits */
.anim-tagline {
  font-size: 32px;
  font-weight: 700;
  color: var(--mas-bronze);
  letter-spacing: 8px;
  text-transform: uppercase;
  height: 40px;
  opacity: 0;
  text-shadow: 0 0 20px rgba(192,123,74,0.6);
}
.anim-tagline.flash { animation: taglineFlash 0.45s ease-out forwards; }
@keyframes taglineFlash {
  0%   { opacity: 0; transform: scale(0.8); filter: blur(8px); }
  40%  { opacity: 1; transform: scale(1.05); filter: blur(0); }
  100% { opacity: 0; transform: scale(1.2); filter: blur(4px); }
}

/* Fase 2: MAS-letters */
.anim-mas {
  display: flex;
  gap: 12px;
  font-size: 140px;
  font-weight: 900;
  color: #fff;
  letter-spacing: 4px;
  height: 0;
  opacity: 0;
  transition: opacity 0.3s, height 0.3s;
}
.anim-mas.show { opacity: 1; height: 160px; }
.anim-letter {
  display: inline-block;
  opacity: 0;
  text-shadow:
    0 0 30px rgba(192,123,74,0.5),
    0 4px 12px rgba(0,0,0,0.6);
}
.anim-letter.l1 { animation: letterIn1 0.7s cubic-bezier(0.2, 0.9, 0.3, 1.4) forwards; }
.anim-letter.l2 { animation: letterIn2 0.7s cubic-bezier(0.2, 0.9, 0.3, 1.4) 0.15s forwards; }
.anim-letter.l3 { animation: letterIn3 0.7s cubic-bezier(0.2, 0.9, 0.3, 1.4) 0.30s forwards; }
@keyframes letterIn1 {
  0%   { opacity: 0; transform: translateX(-300px) rotate(-25deg) scale(0.5); }
  70%  { opacity: 1; transform: translateX(15px) rotate(5deg) scale(1.1); }
  100% { opacity: 1; transform: translateX(0) rotate(0) scale(1); }
}
@keyframes letterIn2 {
  0%   { opacity: 0; transform: translateY(-300px) rotate(15deg) scale(0.5); }
  70%  { opacity: 1; transform: translateY(15px) rotate(-3deg) scale(1.1); }
  100% { opacity: 1; transform: translateY(0) rotate(0) scale(1); }
}
@keyframes letterIn3 {
  0%   { opacity: 0; transform: translateX(300px) rotate(25deg) scale(0.5); }
  70%  { opacity: 1; transform: translateX(-15px) rotate(-5deg) scale(1.1); }
  100% { opacity: 1; transform: translateX(0) rotate(0) scale(1); }
}
.anim-mas.thump { animation: masThump 0.4s ease-out; }
@keyframes masThump {
  0%   { transform: scale(1); }
  30%  { transform: scale(1.06); filter: drop-shadow(0 0 30px rgba(192,123,74,0.8)); }
  100% { transform: scale(1); }
}

/* Fase 3: atoom + powered by ATOM */
.anim-atom-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1.1);
}
.anim-atom-block.show {
  opacity: 1;
  transform: scale(1);
}
.anim-atom-svg {
  filter: drop-shadow(0 0 20px rgba(192,123,74,0.5));
}
.anim-poweredby {
  font-size: 18px;
  letter-spacing: 6px;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
  text-transform: uppercase;
  display: flex;
}
.anim-poweredby span {
  display: inline-block;
  opacity: 0;
  transform: translateY(8px);
}
.anim-poweredby.show span { animation: letterFadeIn 0.4s ease-out forwards; }
.anim-poweredby span.bold {
  color: var(--mas-bronze);
  font-weight: 900;
  font-size: 22px;
  text-shadow: 0 0 12px rgba(192,123,74,0.6);
}
.anim-poweredby.show span:nth-child(1)  { animation-delay: 0.0s; }
.anim-poweredby.show span:nth-child(2)  { animation-delay: 0.05s; }
.anim-poweredby.show span:nth-child(3)  { animation-delay: 0.10s; }
.anim-poweredby.show span:nth-child(4)  { animation-delay: 0.15s; }
.anim-poweredby.show span:nth-child(5)  { animation-delay: 0.20s; }
.anim-poweredby.show span:nth-child(6)  { animation-delay: 0.25s; }
.anim-poweredby.show span:nth-child(7)  { animation-delay: 0.30s; }
.anim-poweredby.show span:nth-child(9)  { animation-delay: 0.40s; }
.anim-poweredby.show span:nth-child(10) { animation-delay: 0.45s; }
.anim-poweredby.show span:nth-child(12) { animation-delay: 0.60s; }
.anim-poweredby.show span:nth-child(13) { animation-delay: 0.65s; }
.anim-poweredby.show span:nth-child(14) { animation-delay: 0.70s; }
.anim-poweredby.show span:nth-child(15) { animation-delay: 0.75s; }
@keyframes letterFadeIn {
  to { opacity: 1; transform: translateY(0); }
}

/* Compat — verbergen oude blink-styles, niet meer gebruikt */
#blink-text { display: none; }

/* ESC-hint onderaan de overlay */
.anim-esc-hint {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  letter-spacing: 4px;
  font-weight: 500;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
}

/* ============================================================
   PS-MANAGER: User info + admin switch
   ============================================================ */
.user-info-box {
  background: linear-gradient(135deg, #f4f6fa 0%, #eaecf4 100%);
  border: 1px solid var(--mas-grey);
  border-left: 4px solid var(--mas-bronze);
  padding: 12px 14px;
  border-radius: 6px;
  margin-bottom: 10px;
}
.user-info-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #888;
  font-weight: 600;
  margin-bottom: 2px;
}
.user-info-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--mas-blue);
}
.user-info-mail {
  font-size: 12px;
  color: #555;
  font-family: 'Consolas', 'Monaco', monospace;
  margin-top: 2px;
}

.admin-switch-box {
  background: #fff4d6;
  border: 1px solid #e5b800;
  padding: 10px 12px;
  border-radius: 6px;
  margin-bottom: 10px;
}
.admin-switch-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: #5b4500;
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.admin-switch-box select {
  width: 100%;
  padding: 8px;
  border: 1px solid #e5b800;
  border-radius: 4px;
  background: #fff;
  font-family: inherit;
  font-size: 13px;
  margin: 0;
  box-sizing: border-box;
}

.no-mail-warning {
  background: #f8d7da;
  border: 1px solid #f1b0b7;
  color: #721c24;
  padding: 12px 14px;
  border-radius: 6px;
  font-size: 13px;
  margin-bottom: 10px;
  line-height: 1.5;
}

/* ============================================================
   HELPERS
   ============================================================ */
.hidden { display: none !important; }

/* ============================================================
   LOGIN SCREEN
   ============================================================ */
.login-body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(135deg, #2F2C7B 0%, #1a1850 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow: hidden;
}
.login-card {
  background: #fff;
  border-radius: 16px;
  padding: 40px 36px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  text-align: center;
  animation: loginFade 0.5s ease;
}
@keyframes loginFade {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.login-logo {
  max-width: 260px;
  max-height: 110px;
  width: auto;
  height: auto;
  object-fit: contain;
  margin-bottom: 20px;
}
.login-title {
  font-size: 22px;
  color: var(--mas-blue);
  margin: 0 0 8px 0;
  font-weight: 700;
}
.login-subtitle {
  font-size: 13px;
  color: #666;
  margin: 0 0 24px 0;
}
.login-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.login-input {
  width: 100%;
  padding: 14px 16px;
  font-size: 15px;
  border: 2px solid var(--mas-grey);
  border-radius: 8px;
  box-sizing: border-box;
  text-align: center;
  letter-spacing: 2px;
  font-family: 'Consolas', 'Monaco', monospace;
  transition: border-color 0.2s ease;
}
.login-input:focus {
  outline: none;
  border-color: var(--mas-bronze);
}
.login-status {
  margin-top: 16px;
  padding: 10px;
  border-radius: 6px;
  font-size: 13px;
  min-height: 20px;
  transition: opacity 0.2s ease;
}
.login-status:empty { padding: 0; min-height: 0; }
.login-status-info    { background: #e8f0fe; color: #1967d2; }
.login-status-success { background: #d4edda; color: #155724; }
.login-status-error   { background: #f8d7da; color: #721c24; }
.login-footer {
  margin-top: 24px;
  font-size: 11px;
  color: #999;
  padding-top: 16px;
  border-top: 1px solid #eee;
}
.login-page-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  text-align: center;
  color: rgba(255,255,255,0.6);
  font-size: 11px;
  padding: 12px;
}

/* ============================================================
   USER PILL IN HEADER (na login zichtbaar)
   ============================================================ */
.user-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.15s ease;
}
.user-pill:hover { background: rgba(255,255,255,0.2); }
.user-pill-name { font-weight: 600; }
.user-pill-role {
  font-size: 10px;
  background: var(--mas-bronze);
  padding: 2px 6px;
  border-radius: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Dropdown menu voor uitloggen */
.user-menu {
  position: absolute;
  top: 62px;
  right: 16px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
  padding: 8px 0;
  min-width: 180px;
  z-index: 200;
  border: 1px solid #eee;
}
.user-menu-item {
  padding: 10px 14px;
  font-size: 13px;
  cursor: pointer;
  color: #333;
}
.user-menu-item:hover { background: #f4f6fa; color: var(--mas-blue); }
.user-menu-separator { height: 1px; background: #eee; margin: 4px 0; }

/* ============ MAS QUOTE (centraal) ============ */
/* Quote-bar onder de datum in launcher */
.launcher-quote-bar {
  max-width: 900px;
  margin: 10px auto 0 auto;
  padding: 10px 18px;
  background: #f4f6fa;
  border-left: 3px solid var(--mas-bronze);
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--mas-blue);
  font-size: 14px;
  font-weight: 600;
  font-style: italic;
  min-height: 22px;
  transition: opacity 0.35s ease;
}
.launcher-quote-label {
  font-size: 16px;
  opacity: 0.9;
}

/* ============ LOADING OVERLAY (centraal) ============ */
.mas-loading-overlay {
  position: fixed;
  inset: 0;
  background: #fff;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s ease;
  opacity: 1;
}
.mas-loading-overlay.hidden {
  opacity: 0;
  pointer-events: none;
  display: none;
}
.mas-loading-inner {
  text-align: center;
  max-width: 640px;
  padding: 0 30px;
}
.mas-loading-logo {
  height: 80px;
  max-width: 220px;
  width: auto;
  margin-bottom: 24px;
  /* Logo in originele kleuren tonen (niet wit gefilterd) */
  filter: none;
}
.mas-loading-ring {
  width: 54px;
  height: 54px;
  border: 4px solid #e5e8ef;
  border-top: 4px solid var(--mas-bronze);
  border-radius: 50%;
  margin: 20px auto;
  animation: mas-spin 1s linear infinite;
}
@keyframes mas-spin {
  to { transform: rotate(360deg); }
}
.mas-loading-text {
  color: var(--mas-blue);
  font-size: 18px;
  font-weight: 700;
  margin-top: 16px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}
.mas-loading-overlay .mas-quote {
  color: var(--mas-blue);
  font-size: 18px;
  font-weight: 600;
  font-style: normal;
  max-width: 580px;
  margin-top: 22px;
  padding: 14px 22px;
  background: #f4f6fa;
  border-radius: 8px;
  border-left: 3px solid var(--mas-bronze);
  text-shadow: none;
  text-align: center;
  line-height: 1.45;
}

/* ============ EASTER EGG OVERLAY (!) ============ */
.mas-easter-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,0.97);
  z-index: 200000;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.mas-easter-overlay.hidden {
  display: none;
}
.mas-easter-overlay.active {
  opacity: 1;
}
.mas-easter-content {
  text-align: center;
  padding: 40px;
  max-width: 90%;
  transform: scale(0.7);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.mas-easter-overlay.active .mas-easter-content {
  transform: scale(1);
}
.mas-easter-label {
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 800;
  color: var(--mas-bronze);
  letter-spacing: 6px;
  text-transform: uppercase;
  margin-bottom: 18px;
  padding: 0 12px;
}
.mas-easter-quote {
  font-size: clamp(32px, 5vw, 58px);
  font-weight: 800;
  color: var(--mas-blue);
  line-height: 1.2;
  letter-spacing: -0.5px;
  margin-bottom: 24px;
  padding: 0 20px;
}
.mas-easter-hint {
  font-size: 13px;
  color: #888;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 2px;
}
/* Roterende quote op laadschermen en progressbalken */
.mas-quote {
  margin: 22px auto 10px auto;
  font-size: 20px;
  font-style: normal;
  font-weight: 600;
  color: var(--mas-blue);
  text-align: center;
  line-height: 1.4;
  min-height: 32px;
  opacity: 1;
  max-width: 620px;
  padding: 12px 24px;
}
/* Op het splash-scherm (lichte achtergrond): bronze, dik en duidelijk */
#splash-screen .mas-quote {
  color: var(--mas-bronze);
  font-size: 19px;
  font-weight: 700;
  text-shadow: none;
  margin-top: 26px;
  line-height: 1.5;
  max-width: 640px;
  letter-spacing: 0.2px;
}
/* Onder progressbalken in laadscherm-overlays */
.loading-overlay .mas-quote,
.create-progress .mas-quote,
#progress-container .mas-quote {
  margin-top: 16px;
  font-size: 17px;
  color: var(--mas-bronze);
}

/* ✏️ bewerkknop op dynamische tegels (Syntess-templates, admin-only) */
.app-edit-btn {
    position: absolute;
    top: 8px;
    left: 8px;
    border: none;
    background: transparent;
    font-size: 14px;
    cursor: pointer;
    line-height: 1;
    opacity: 0.55;
    transition: opacity 0.12s ease, transform 0.12s ease;
}
.app-edit-btn:hover { opacity: 1; transform: scale(1.2); }

/* ============ Popup: Slim Inloggen-grid ============ */
.popup-inlog {
  padding: 10px 14px 14px;
  border-top: 1px solid var(--mas-grey);
  margin-top: 10px;
}
.popup-inlog-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--mas-blue);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}
.popup-inlog-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.popup-inlog-btn {
  background: #fff;
  border: 1px solid var(--mas-grey);
  border-radius: 8px;
  padding: 8px 6px;
  cursor: pointer;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.1s ease, box-shadow 0.1s ease, border-color 0.1s ease;
}
.popup-inlog-btn img {
  max-width: 100%;
  max-height: 26px;
  object-fit: contain;
}
.popup-inlog-btn:hover {
  transform: translateY(-1px);
  border-color: var(--mas-bronze);
  box-shadow: 0 3px 10px rgba(0,0,0,0.12);
}
.popup-inlog-btn.is-empty { opacity: 0.4; filter: grayscale(1); }
.popup-inlog-btn.is-empty:hover { opacity: 0.7; }
