
/* Security/visibility gate: keep locked app content truly hidden until JS unlocks it. */
[hidden] {
  display: none !important;
}

:root {
  --red: #d90000;
  --deep-red: #910000;
  --deepest-red: #620000;
  --yellow: #ffd400;
  --white: #fff;
  --ink: #141414;
  --ink-soft: #2b2b2b;
  --muted: #686868;
  --border: rgba(255, 255, 255, 0.2);
  --panel: rgba(38, 0, 0, 0.42);
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.28);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--white);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.14), transparent 36rem),
    linear-gradient(135deg, #bf0000 0%, #880000 55%, #560000 100%);
}

button, input, select { font: inherit; }

.app-shell {
  width: min(1500px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 32px 0;
  display: grid;
  grid-template-columns: 400px 1fr;
  gap: 24px;
  align-items: start;
}

.panel {
  border: 1px solid var(--border);
  border-radius: 28px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.controls {
  padding: 24px;
  position: sticky;
  top: 24px;
}

.brand-row {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 16px;
  align-items: center;
}

h1, h2, p { margin-top: 0; }

h1 {
  margin-bottom: 4px;
  line-height: 1.05;
  font-size: 1.85rem;
}

h2 {
  margin-bottom: 2px;
  font-size: 1.2rem;
}

p {
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.45;
}

form {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

label {
  display: grid;
  gap: 8px;
  color: rgba(255, 255, 255, 0.88);
  font-weight: 700;
}

input[type="text"],
select {
  width: 100%;
  border: 0;
  border-radius: 14px;
  padding: 13px 14px;
  color: var(--ink);
  background: var(--white);
  box-shadow: inset 0 0 0 2px transparent;
}

input[type="text"]:focus,
input[type="range"]:focus,
button:focus,
select:focus {
  outline: 3px solid rgba(255, 212, 0, 0.46);
  outline-offset: 2px;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.file-drop {
  border: 2px dashed rgba(255, 255, 255, 0.36);
  border-radius: 18px;
  padding: 18px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.08);
}

.file-drop span,
.toggle-help {
  color: rgba(255, 255, 255, 0.7);
  font-weight: 600;
  font-size: 0.92rem;
}

.file-drop input { margin-top: 8px; max-width: 100%; }

.advanced-row {
  align-items: start;
}

.check-toggle {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.07);
  padding: 12px 14px;
}

.checkbox-line {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}

.checkbox-line input {
  width: 18px;
  height: 18px;
  accent-color: var(--yellow);
}

.details-note {
  font-size: 0.9rem;
}

details {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.07);
}

summary {
  cursor: pointer;
  font-weight: 800;
}

.sliders {
  display: grid;
  gap: 12px;
  padding-top: 14px;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--yellow);
}

.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

button {
  border: 0;
  border-radius: 999px;
  padding: 13px 18px;
  color: #7a0000;
  background: var(--yellow);
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.22);
}

button:hover { transform: translateY(-1px); }

button.secondary {
  color: var(--white);
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

button.compact {
  padding: 9px 14px;
  font-size: 0.9rem;
}

.note,
.preview-meta {
  margin: 0;
  font-size: 0.92rem;
}

.spark {
  position: relative;
  width: 58px;
  height: 58px;
}

.spark span {
  position: absolute;
  left: 24px;
  top: 5px;
  width: 10px;
  height: 23px;
  border-radius: 999px;
  background: var(--yellow);
  transform-origin: 5px 24px;
}

.spark span:nth-child(2) { transform: rotate(60deg); }
.spark span:nth-child(3) { transform: rotate(120deg); }
.spark span:nth-child(4) { transform: rotate(180deg); }
.spark span:nth-child(5) { transform: rotate(240deg); }
.spark span:nth-child(6) { transform: rotate(300deg); }

.preview-panel {
  padding: 18px;
}

.preview-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 14px;
}

canvas {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 22px;
  background: #b80000;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.34);
}

@media (max-width: 1080px) {
  .app-shell { grid-template-columns: 1fr; }
  .controls { position: static; }
}

@media (max-width: 620px) {
  .app-shell {
    width: min(100vw - 18px, 1500px);
    padding: 12px 0;
  }

  .panel { border-radius: 20px; }
  .controls, .preview-panel { padding: 16px; }
  .two-col, .actions { grid-template-columns: 1fr; }
  .preview-header { flex-direction: column; }
}


.feature-inputs {
  display: grid;
  gap: 12px;
}


.spark-logo {
  width: 58px;
  height: 58px;
}

.spark-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}


/* Match the floating home button used by the other Print797 apps. */
.print797-floating-home {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #087bff;
  color: #fff !important;
  text-decoration: none;
  display: grid;
  place-items: center;
  font-size: 34px;
  line-height: 1;
  box-shadow: 0 16px 38px rgba(0,123,255,.42);
  z-index: 9999;
  border: 1px solid rgba(255,255,255,.22);
}

body {
  padding-bottom: 94px;
}


.color-control {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 260px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.88rem;
  font-weight: 700;
}



.color-select {
  min-width: 128px;
  border: 0;
  border-radius: 10px;
  padding: 8px 10px;
  color: var(--ink);
  background: #fff;
  font-weight: 800;
  box-shadow: inset 0 0 0 2px transparent;
}

.login-shell {
  position: fixed;
  inset: 0;
  z-index: 9999;
  width: 100%;
  min-height: 100vh;
  margin: 0;
  display: grid;
  place-items: center;
  padding: 32px 16px;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.16), transparent 32rem),
    linear-gradient(135deg, #f00000 0%, #b80000 48%, #760000 100%);
}

.login-card {
  width: 100%;
  padding: 24px;
  display: grid;
  gap: 18px;
}

.manager-nav {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: rgba(20, 0, 0, 0.34);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  padding: 14px 18px;
}

.nav-brand,
.nav-actions a {
  color: #fff;
  text-decoration: none;
  font-weight: 900;
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.nav-brand img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.nav-actions a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  border-radius: 999px;
  padding: 9px 14px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.expiration-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

input[type="date"],
input[type="time"] {
  width: 100%;
  border: 0;
  border-radius: 14px;
  padding: 13px 14px;
  color: var(--ink);
  background: var(--white);
}

.admin-shell {
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 32px 0;
  display: grid;
  gap: 20px;
}

.ads-list {
  display: grid;
  gap: 14px;
}

.ad-row {
  display: grid;
  grid-template-columns: 180px 1fr auto;
  gap: 16px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: rgba(20, 0, 0, 0.34);
  box-shadow: var(--shadow);
  padding: 14px;
}

.ad-row img {
  display: block;
  width: 180px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 14px;
  background: #fff;
}

.ad-row h3 {
  margin: 0 0 6px;
}

.ad-row p {
  margin: 0;
}

.status-pill {
  display: inline-flex;
  border-radius: 999px;
  padding: 5px 10px;
  margin-top: 8px;
  background: rgba(255, 212, 0, 0.18);
  color: #fff;
  font-weight: 900;
}

.player-body {
  margin: 0;
  min-height: 100vh;
  background: #000;
  overflow: hidden;
}

.player-stage {
  width: 100vw;
  height: 100vh;
  background: #000;
  display: grid;
  place-items: center;
  position: relative;
}

.player-stage img {
  width: 100vw;
  height: 100vh;
  object-fit: contain;
  background: #000;
}

.player-empty {
  color: #fff;
  text-align: center;
  font-family: Arial, Helvetica, sans-serif;
}

.player-empty h1 {
  font-size: clamp(2rem, 6vw, 5rem);
}

@media (max-width: 720px) {
  .manager-nav,
  .nav-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .expiration-grid,
  .ad-row {
    grid-template-columns: 1fr;
  }

  .ad-row img {
    width: 100%;
  }
}
