:root {
  --bg: #0b0c10;
  --panel: #14161d;
  --panel-2: #1a1d26;
  --border: #2a2e39;
  --text: #f4f6fb;
  --muted: #959baa;
  --accent: #ff3b5c;
  --accent-2: #25f4ee;
  --green: #2ad47a;
  --paper: #fffef9;
  --ink: #171717;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input { font: inherit; }

.dashboard-page { background: var(--bg); color: var(--text); }
.dashboard {
  width: min(1500px, 100%);
  margin: 0 auto;
  padding: 24px;
  display: grid;
  grid-template-columns: minmax(380px, 560px) minmax(360px, 1fr);
  gap: 24px;
  align-items: start;
}
.panel, .preview-shell {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: 0 24px 80px rgba(0,0,0,.28);
}
.control-panel { padding: 22px; }
.brand-row, .section-title-row, .preview-header, .room-row, .button-row { display: flex; align-items: center; gap: 10px; }
.brand-row { justify-content: space-between; align-items: flex-start; margin-bottom: 18px; }
.brand-row h1 { margin: 3px 0 5px; font-size: 26px; }
.brand-row p, .muted { margin: 0; color: var(--muted); }
.eyebrow { color: var(--accent-2); font-size: 11px; letter-spacing: .12em; font-weight: 800; }
.status-badge { border-radius: 999px; padding: 7px 10px; font-size: 11px; font-weight: 900; letter-spacing: .08em; background: #303440; color: #bec3ce; }
.status-badge.connected { background: rgba(42,212,122,.16); color: #78f2ad; }
.status-badge.connecting { background: rgba(255,190,70,.16); color: #ffd176; }
.status-badge.error, .status-badge.ended { background: rgba(255,59,92,.16); color: #ff8096; }

.section-card { border-top: 1px solid var(--border); padding: 18px 0 2px; margin-top: 16px; }
.section-card h2 { margin: 0 0 14px; font-size: 15px; }
.section-title-row { justify-content: space-between; }
.field-label { display: block; margin: 10px 0 6px; font-size: 12px; color: #c6cbd6; font-weight: 700; }
input { width: 100%; background: #0f1117; color: var(--text); border: 1px solid #333845; border-radius: 10px; padding: 11px 12px; outline: none; }
input:focus { border-color: var(--accent-2); box-shadow: 0 0 0 3px rgba(37,244,238,.09); }
.input-prefix { display: flex; border: 1px solid #333845; border-radius: 10px; overflow: hidden; background: #0f1117; }
.input-prefix:focus-within { border-color: var(--accent-2); box-shadow: 0 0 0 3px rgba(37,244,238,.09); }
.input-prefix span { padding: 11px 0 11px 12px; color: var(--muted); }
.input-prefix input { border: 0; box-shadow: none !important; }
.room-row input { flex: 1; }
.button-row { margin-top: 11px; }
.button { border: 0; border-radius: 10px; padding: 10px 14px; font-weight: 800; cursor: pointer; transition: transform .15s ease, filter .15s ease, background .15s ease; }
.button:hover { transform: translateY(-1px); filter: brightness(1.06); }
.button.primary { background: linear-gradient(135deg, var(--accent), #ff6b58); color: white; }
.button.secondary { background: #242833; color: #f1f3f7; border: 1px solid #363b48; }
.button.ghost { background: transparent; color: var(--accent-2); border: 1px solid #2f5d5c; }
.button.small { padding: 8px 10px; font-size: 12px; }
.status-log { margin-top: 11px; min-height: 54px; max-height: 90px; overflow: auto; border-radius: 10px; background: #0c0e13; color: #aeb4c2; padding: 10px; font: 12px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; border: 1px solid #252a34; }
.check { display: flex; gap: 9px; align-items: center; margin: 10px 0; font-size: 13px; }
.check input { width: 17px; height: 17px; accent-color: var(--accent); }
.split-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.suffix-input { position: relative; }
.suffix-input span { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); }
.sim-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 12px; }
.sim { text-align: left; }

.preview-shell { padding: 18px; position: sticky; top: 24px; }
.preview-header { justify-content: space-between; margin-bottom: 14px; }
.preview-header > div { display: flex; flex-direction: column; gap: 2px; }
.preview-header span { color: var(--muted); font-size: 12px; }
.preview-header .live-dot { color: white; background: var(--accent); border-radius: 999px; padding: 5px 9px; font-size: 10px; font-weight: 900; letter-spacing: .08em; }
.preview-shell iframe { display: block; width: min(100%, 480px); aspect-ratio: 9 / 16; border: 1px solid #333845; border-radius: 18px; margin: 0 auto; background: black; }

/* Overlay */
.overlay-page { overflow: hidden; background: transparent; }
.printer-stage {
  position: relative;
  width: 100vw;
  height: 100vh;
  min-height: 650px;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 18%, rgba(255,59,92,.17), transparent 34%),
    radial-gradient(circle at 82% 28%, rgba(37,244,238,.14), transparent 30%),
    linear-gradient(180deg, #12151d, #090a0e 78%);
  color: white;
}
.background-layer { position: absolute; inset: 0; overflow: hidden; }
.ambient { position: absolute; border-radius: 50%; filter: blur(40px); opacity: .45; }
.ambient-one { width: 34vw; height: 34vw; min-width: 260px; min-height: 260px; background: rgba(255,59,92,.18); left: -12%; top: 8%; }
.ambient-two { width: 30vw; height: 30vw; min-width: 240px; min-height: 240px; background: rgba(37,244,238,.15); right: -10%; top: 32%; }
.paper-window {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 0;
  width: 74%;
  height: 76%;
  overflow: hidden;
  filter: drop-shadow(0 16px 28px rgba(0,0,0,.35));
}
.paper {
  min-height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #f1f0ea, #fffef9 8%, #fff 51%, #f4f1e9 92%, #e3e0d7);
  color: var(--ink);
  border-radius: 0 0 4px 4px;
}
.paper::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .17;
  background-image: repeating-linear-gradient(0deg, transparent 0 5px, rgba(0,0,0,.025) 5px 6px);
}
.paper-feed { position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; padding: 20px 6% 70px; scroll-behavior: smooth; scrollbar-width: none; }
.paper-feed::-webkit-scrollbar { display: none; }
.welcome-print { text-align: center; padding: 8vh 4% 4vh; opacity: .72; }
.welcome-print .tiny-mark { font: 900 10px/1 ui-monospace, monospace; letter-spacing: .24em; }
.welcome-print h1 { margin: 12px 0 6px; font-size: clamp(18px, 3.6vw, 34px); line-height: 1.05; }
.welcome-print p { margin: 0; font-size: clamp(11px, 2vw, 17px); }

.print-card {
  margin: 12px 0;
  border-top: 1px dashed #bdb9ae;
  padding: 14px 0 6px;
  opacity: 0;
  transform: translateY(90px) scaleY(.5);
  transform-origin: bottom;
  filter: blur(1px);
}
.print-card.printed {
  animation: emerge var(--print-duration, 900ms) cubic-bezier(.2,.8,.2,1) forwards;
}
@keyframes emerge {
  0% { opacity: 0; transform: translateY(100px) scaleY(.28); filter: blur(2px); }
  36% { opacity: .75; }
  100% { opacity: 1; transform: translateY(0) scaleY(1); filter: none; }
}
.print-profile { display: flex; align-items: center; gap: 10px; }
.print-profile strong { display: block; font-size: clamp(12px, 2.4vw, 20px); }
.print-profile span { display: block; color: #666; font-size: clamp(9px, 1.8vw, 14px); }
.print-avatar { width: clamp(42px, 8vw, 74px); height: clamp(42px, 8vw, 74px); border-radius: 50%; object-fit: cover; border: 2px solid #1d1d1d; background: #eee; }
.avatar-fallback { display: grid; place-items: center; font-weight: 900; }
.comment blockquote { margin: 10px 0 0; font: 700 clamp(13px, 2.7vw, 23px)/1.22 Georgia, serif; }
.join, .social { display: flex; align-items: center; gap: 12px; }
.join .print-avatar, .social .print-avatar { width: clamp(34px, 6vw, 55px); height: clamp(34px, 6vw, 55px); }
.social-copy strong, .join .social-copy strong { display: block; font-size: clamp(11px, 2.1vw, 17px); }
.social-copy span { display: block; margin-top: 2px; color: #5c5c5c; font-size: clamp(9px, 1.75vw, 14px); }
.gift { text-align: center; }
.gift .print-avatar { margin: 8px auto; }
.gift.small .print-avatar { width: clamp(62px, 12vw, 108px); height: clamp(62px, 12vw, 108px); }
.gift.medium .print-avatar { width: clamp(90px, 18vw, 150px); height: clamp(90px, 18vw, 150px); border-width: 3px; }
.gift.large { padding: 18px 3% 14px; border: 3px double #151515; }
.gift.large .print-avatar { width: clamp(150px, 31vw, 280px); height: clamp(150px, 31vw, 280px); border-width: 5px; }
.gift-headline { font: 900 clamp(11px, 2.4vw, 21px)/1 ui-monospace, monospace; letter-spacing: .05em; }
.big-user { display: block; margin-top: 6px; font-size: clamp(14px, 3vw, 26px); }
.gift-line { display: block; margin-top: 5px; font: 900 clamp(14px, 3vw, 25px)/1.1 ui-monospace, monospace; }

.printer-machine {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 13.5%;
  transform: translateX(-50%);
  width: 88%;
  height: 15%;
  min-height: 105px;
  border-radius: 20px 20px 28px 28px;
  background: linear-gradient(180deg, #343944 0 26%, #16191f 27% 100%);
  box-shadow: 0 28px 50px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.16);
  border: 1px solid #414650;
}
.printer-top { position: absolute; left: 5%; right: 5%; top: 6%; height: 25%; }
.slot { position: absolute; left: 10%; right: 10%; top: 45%; height: 10px; border-radius: 999px; background: #050607; box-shadow: inset 0 2px 4px #000; }
.status-light { position: absolute; right: 2%; top: 20%; width: 12px; height: 12px; border-radius: 50%; background: #62e894; box-shadow: 0 0 14px rgba(98,232,148,.7); }
.printer-body { height: 100%; display: flex; align-items: center; justify-content: space-between; padding: 30px 7% 0; font-weight: 900; letter-spacing: .12em; color: #9298a3; font-size: clamp(11px, 2vw, 20px); }
.printer-buttons { display: flex; gap: 8px; }
.printer-buttons i { display: block; width: clamp(11px, 2vw, 18px); aspect-ratio: 1; border-radius: 4px; background: #2e333d; border: 1px solid #454b56; }
.printing-now .printer-machine { animation: machineShake .105s linear infinite alternate; }
@keyframes machineShake { from { transform: translateX(-50%) translateY(0); } to { transform: translateX(-50%) translateY(1.5px); } }

.live-instructions {
  position: absolute;
  left: 5%; right: 5%; bottom: 2%;
  min-height: 10%;
  padding: 10px 12px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  color: white;
  text-shadow: 0 2px 10px #000;
}
.live-instructions strong { font-size: clamp(14px, 3vw, 27px); }
.live-instructions span { font-size: clamp(11px, 2.15vw, 20px); color: #e3e6ed; }
.connection-pill {
  position: absolute;
  z-index: 8;
  right: 2.5%;
  top: 2%;
  max-width: 58%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(0,0,0,.55);
  border: 1px solid rgba(255,255,255,.13);
  backdrop-filter: blur(8px);
  color: #bdc2cc;
  font-size: clamp(9px, 1.6vw, 14px);
}
.connection-pill.connected { color: #75f2a9; }
.connection-pill.error { color: #ff8da0; }
.connection-pill.connecting { color: #ffd071; }

@media (max-width: 980px) {
  .dashboard { grid-template-columns: 1fr; }
  .preview-shell { position: static; }
}

/* MVP 0.2 — eventos comuns são impressos como texto; FOTO somente em presentes. */
.text-only {
  text-align: left;
}
.text-identity strong {
  display: block;
  font-size: clamp(12px, 2.35vw, 20px);
  line-height: 1.05;
}
.text-identity span {
  display: block;
  margin-top: 2px;
  color: #777168;
  font-size: clamp(9px, 1.55vw, 13px);
}
.text-only.comment blockquote {
  margin: 7px 0 0;
  font: 700 clamp(13px, 2.8vw, 23px)/1.23 Georgia, serif;
  overflow-wrap: anywhere;
}
.text-only.join,
.text-only.social {
  display: flex;
  align-items: flex-start;
  gap: 9px;
}
.text-event-icon {
  flex: 0 0 auto;
  font-size: clamp(14px, 2.7vw, 22px);
  line-height: 1;
  margin-top: 2px;
}
.text-only .social-copy {
  min-width: 0;
}
.text-only .social-copy > span {
  display: block;
  margin-top: 3px;
  color: #57534d;
  font-size: clamp(10px, 1.85vw, 15px);
}
