:root {
  --ink: #17202a;
  --muted: #657281;
  --paper: #f6f8fb;
  --white: #ffffff;
  --line: #dde5eb;
  --teal: #087f7a;
  --green: #4d9d32;
  --coral: #ef6046;
  --amber: #e39a05;
  --navy: #102b3a;
  --shadow: 0 18px 50px rgba(16, 43, 58, .12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Arial, Helvetica, sans-serif;
}

.login-body {
  min-height: 100vh;
  background:
    linear-gradient(120deg, rgba(8, 127, 122, .18), transparent 45%),
    linear-gradient(315deg, rgba(239, 96, 70, .14), transparent 42%),
    #f6f8fb;
}

a {
  color: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  min-height: 68px;
  padding: 12px min(5vw, 52px);
  color: var(--white);
  background: rgba(16, 43, 58, .96);
  box-shadow: 0 8px 26px rgba(16, 43, 58, .18);
}

.topbar strong,
.topbar span {
  display: block;
}

.topbar span {
  color: #b8d2d5;
  font-size: 13px;
}

.topbar a {
  text-decoration: none;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 8px;
}

.topbar nav {
  display: none;
}

.admin-view .topbar nav {
  display: block;
}

.share-view {
  background: #eef8f2;
}

.share-view .topbar {
  background: rgba(6, 95, 79, .96);
}

.watch-view .topbar {
  display: none;
}

.watch-view {
  min-height: 100vh;
  color: #f5f7f8;
  background:
    radial-gradient(circle at 30% 0, rgba(29, 185, 117, .24), transparent 35%),
    linear-gradient(180deg, #111820 0%, #070b10 100%);
}

main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 60px;
}

.watch-view main {
  width: min(980px, calc(100% - 28px));
  padding: 24px 0 44px;
}

.login-shell {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px;
}

.login-panel {
  width: min(480px, 100%);
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .94);
  box-shadow: var(--shadow);
}

.login-panel h1 {
  margin-bottom: 12px;
  font-size: clamp(34px, 8vw, 52px);
}

.login-form {
  display: grid;
  gap: 14px;
  margin-top: 24px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 440px);
  gap: 28px;
  align-items: start;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 760px;
  margin-bottom: 16px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.02;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 12px;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.08;
}

.lead {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.form-card {
  display: grid;
  gap: 14px;
  padding: 22px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--navy);
  font-size: 13px;
  font-weight: 700;
}

input,
textarea {
  width: 100%;
  border: 1px solid #cbd6df;
  border-radius: 8px;
  padding: 12px 13px;
  color: var(--ink);
  background: var(--white);
  font: inherit;
}

button,
.whatsapp {
  border: 0;
  border-radius: 8px;
  padding: 12px 15px;
  color: #042d27;
  background: #9df2cf;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
}

button.secondary {
  color: var(--navy);
  background: #e9eef2;
}

.whatsapp {
  display: block;
  color: var(--white);
  background: #1aa95b;
}

.status {
  min-height: 18px;
  margin: 0;
  color: var(--teal);
  font-size: 13px;
  font-weight: 700;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
  margin: 42px 0 16px;
}

.campaign-list {
  display: grid;
  gap: 18px;
}

.campaign-card {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(340px, .8fr);
  gap: 20px;
  padding: 22px;
}

.link-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin: 15px 0;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 15px;
}

.stat {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfe;
}

.stat b {
  display: block;
  font-size: 28px;
  line-height: 1;
  color: var(--navy);
}

.stat span {
  color: var(--muted);
  font-size: 12px;
}

.collab-table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.collab-table th,
.collab-table td {
  padding: 9px 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 13px;
}

.collab-table th {
  color: var(--muted);
  background: #f4f7f9;
}

.viewer-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 400px);
  gap: 24px;
  align-items: start;
}

.share-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
  gap: 22px;
  align-items: start;
}

.video-panel,
.share-panel {
  padding: 22px;
}

.public-card {
  box-shadow: 0 12px 34px rgba(6, 95, 79, .12);
}

video {
  display: block;
  width: 100%;
  max-height: 62vh;
  margin-top: 18px;
  border-radius: 8px;
  background: #0a171d;
}

.generated {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.hidden {
  display: none !important;
}

.watch-status {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 12px;
  color: var(--muted);
}

.watch-status span:first-child {
  color: var(--teal);
  font-size: 30px;
  font-weight: 900;
}

.watch-shell {
  display: grid;
  min-height: calc(100vh - 68px);
  place-items: center;
}

.watch-card {
  width: min(900px, 100%);
  padding: clamp(18px, 4vw, 30px);
}

.watch-card h1 {
  max-width: none;
  margin-bottom: 8px;
  color: #ffffff;
  font-size: clamp(30px, 7vw, 54px);
}

.watch-card .lead,
.viewer-note {
  color: #b9c3ca;
}

.watch-from {
  margin-bottom: 12px;
  color: #8ce9bf;
  font-weight: 800;
}

.player-frame {
  overflow: hidden;
  margin-top: 20px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px;
  background: #000;
  box-shadow: 0 22px 70px rgba(0, 0, 0, .36);
}

.player-frame video {
  max-height: 70vh;
  margin-top: 0;
  border-radius: 0;
}

.viewer-note {
  margin-top: 14px;
  font-weight: 700;
}

.privacy-note {
  padding: 13px;
  border: 1px solid #bfe6da;
  border-radius: 8px;
  color: var(--teal);
  background: #f6fffb;
  font-weight: 700;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(16, 32, 42, .64);
}

.modal-card {
  position: relative;
  width: min(440px, 100%);
  padding: 24px;
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  padding: 0;
  color: var(--navy);
  background: #e9eef2;
}

#name-form {
  display: grid;
  gap: 12px;
}

@media (max-width: 900px) {
  .hero,
  .campaign-card,
  .viewer-layout,
  .share-layout {
    grid-template-columns: 1fr;
  }

  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section-head {
    align-items: start;
    flex-direction: column;
  }

  .watch-view main {
    width: 100%;
    padding: 0;
  }

  .watch-shell {
    min-height: 100vh;
    place-items: start stretch;
  }

  .watch-card {
    padding: 24px 18px 32px;
  }
}
