:root {
  --navy: #07384b;
  --blue: #006a8b;
  --cyan: #16a6b8;
  --teal: #35b99a;
  --red: #e74646;
  --bg: #f2f7f9;
  --card: #ffffff;
  --text: #17333c;
  --muted: #6d8187;
  --line: #dce8eb;
  --green-bg: #eaf8f3;
  --shadow:
    0 16px 45px
    rgba(12,54,68,.10);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;

  color: var(--text);

  background:
    radial-gradient(
      circle at 8% 4%,
      rgba(21,166,184,.12),
      transparent 28%
    ),
    linear-gradient(
      145deg,
      #f2f8fa 0%,
      #fff 58%,
      #eef7f7 100%
    );
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: .55;
}

a {
  color: inherit;
}

.shell {
  width:
    min(
      1220px,
      calc(100% - 28px)
    );

  margin: 0 auto;
}

.topbar {
  min-height: 74px;

  display: flex;
  align-items: center;
  justify-content:
    space-between;

  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 43px;
  height: 43px;

  display: grid;
  place-items: center;

  border-radius: 14px;

  background:
    linear-gradient(
      135deg,
      var(--blue),
      var(--cyan)
    );

  color: white;

  font-size: 24px;
  font-weight: 900;

  box-shadow:
    0 10px 25px
    rgba(0,106,139,.22);
}

.brand strong {
  display: block;

  letter-spacing: -.3px;
}

.brand span {
  display: block;

  margin-top: 1px;

  font-size: 12px;

  color: var(--muted);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.live-badge {
  display: inline-flex;
  align-items: center;

  gap: 8px;

  padding: 9px 13px;

  border:
    1px solid #ffd2d2;

  border-radius: 999px;

  background: #fff3f3;

  color: #b52f2f;

  font-size: 13px;
  font-weight: 750;
}

.live-dot {
  width: 8px;
  height: 8px;

  border-radius: 50%;

  background: var(--red);

  box-shadow:
    0 0 0 5px
    rgba(231,70,70,.12);
}

.card {
  border:
    1px solid
    var(--line);

  border-radius: 24px;

  background:
    rgba(255,255,255,.96);

  box-shadow:
    var(--shadow);
}

.center-page {
  min-height:
    calc(100vh - 74px);

  display: grid;
  place-items: center;

  padding:
    28px 0 60px;
}

.register-card {
  width:
    min(620px,100%);

  padding: 42px;
}

.eyebrow {
  color: var(--blue);

  font-size: 12px;
  font-weight: 800;

  letter-spacing: .12em;

  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 10px;

  font-size:
    clamp(
      34px,
      6vw,
      54px
    );

  line-height: 1.02;

  letter-spacing: -2px;
}

.subtitle {
  color: var(--muted);

  font-size: 16px;
  line-height: 1.55;
}

.form-grid {
  display: grid;

  gap: 16px;

  margin-top: 28px;
}

.field {
  display: grid;

  gap: 7px;
}

.field label {
  font-size: 13px;
  font-weight: 750;
}

.input,
.textarea,
.select {
  width: 100%;

  border:
    1px solid #cbdde1;

  border-radius: 14px;

  outline: none;

  background: #fff;

  color: var(--text);

  transition: .2s;
}

.input,
.select {
  height: 49px;

  padding:
    0 14px;
}

.textarea {
  min-height: 118px;

  padding:
    13px 14px;

  resize: vertical;
}

.input:focus,
.textarea:focus,
.select:focus {
  border-color:
    var(--cyan);

  box-shadow:
    0 0 0 4px
    rgba(22,166,184,.11);
}

.btn {
  min-height: 46px;

  border: 0;

  border-radius: 13px;

  padding:
    0 17px;

  font-weight: 750;

  text-decoration: none;
}

.btn-primary {
  background:
    linear-gradient(
      135deg,
      var(--blue),
      var(--cyan)
    );

  color: white;

  box-shadow:
    0 9px 20px
    rgba(0,106,139,.19);
}

.btn-soft {
  background: #eef6f8;

  color: var(--navy);
}

.btn-danger {
  background: #fff0f0;

  color: #b43737;
}

.btn-green {
  background:
    var(--green-bg);

  color: #137158;
}

.btn-small {
  min-height: 35px;

  padding:
    0 11px;

  font-size: 12px;
}

.notice {
  margin-top: 19px;

  padding:
    13px 15px;

  border-radius: 13px;

  background: #f4f8f9;

  color: var(--muted);

  font-size: 12px;
  line-height: 1.5;
}

.success {
  color: #137158;

  font-size: 13px;
}

.error {
  color: #b63030;

  font-size: 13px;
}

.event-layout {
  display: grid;

  grid-template-columns:
    minmax(0,1fr)
    430px;

  gap: 20px;

  padding-bottom: 40px;
}

.stage {
  min-height: 570px;

  padding: 20px;
}

.video-placeholder {
  height: 100%;

  min-height: 525px;

  border-radius: 19px;

  display: grid;
  place-items: center;

  overflow: hidden;

  background:
    radial-gradient(
      circle at 50% 35%,
      rgba(30,190,205,.17),
      transparent 28%
    ),
    linear-gradient(
      145deg,
      #062f40,
      #0b5366
    );

  color: white;

  text-align: center;
}

.video-placeholder strong {
  display: block;

  font-size: 29px;
}

.video-placeholder span {
  display: block;

  margin-top: 9px;

  color:
    rgba(
      255,
      255,
      255,
      .68
    );
}

body.chat-only
.event-layout {
  grid-template-columns:
    minmax(0,1fr);

  max-width: 880px;

  margin: 0 auto;
}

body.chat-only
.stage {
  display: none;
}

body.chat-only
.chat {
  height:
    calc(100vh - 105px);
}

.chat {
  height:
    calc(100vh - 110px);

  min-height: 620px;

  display: flex;
  flex-direction: column;

  overflow: hidden;
}

.chat-head {
  padding:
    19px 20px;

  border-bottom:
    1px solid
    var(--line);
}

.chat-head h2 {
  margin-bottom: 4px;

  font-size: 18px;
}

.chat-head p {
  margin: 0;

  color: var(--muted);

  font-size: 12px;
}

.feed {
  flex: 1;

  overflow-y: auto;

  padding: 14px;
}

.question {
  margin-bottom: 12px;

  padding: 14px;

  border:
    1px solid
    #e1eaec;

  border-radius: 16px;

  background: #fff;
}

.question.pinned {
  border-color:
    #9fdbe2;

  box-shadow:
    inset 3px 0 0
    var(--cyan);
}

.q-meta {
  display: flex;

  justify-content:
    space-between;

  gap: 10px;

  margin-bottom: 8px;

  font-size: 11px;

  color: var(--muted);
}

.q-name {
  color: var(--navy);

  font-weight: 800;
}

.q-body {
  font-size: 14px;

  line-height: 1.5;

  white-space: pre-wrap;
}

.q-actions {
  margin-top: 11px;

  display: flex;
  align-items: center;

  gap: 8px;
}

.like {
  min-height: 31px;

  border:
    1px solid
    #dce8eb;

  border-radius: 999px;

  padding:
    0 10px;

  background: #f7fafb;

  color: #526d74;

  font-size: 12px;
}

.like.active {
  border-color:
    #92d5df;

  background: #eaf9fb;

  color: #08788a;
}

.reply {
  margin-top: 10px;

  padding:
    11px 12px;

  border-radius: 12px;

  background: #edf7f8;

  font-size: 13px;

  line-height: 1.45;
}

.reply.doctor {
  background: #e9f8f1;
}

.reply-author {
  margin-bottom: 4px;

  font-weight: 800;

  color: var(--blue);
}

.reply.doctor
.reply-author {
  color: #1d7b60;
}

.composer {
  padding: 14px;

  border-top:
    1px solid
    var(--line);

  background: #fff;
}

.composer-row {
  display: flex;

  align-items: flex-end;

  gap: 9px;
}

.composer
.textarea {
  min-height: 72px;
}

.admin-layout {
  display: grid;

  grid-template-columns:
    270px
    minmax(0,1fr);

  gap: 20px;

  padding-bottom: 50px;
}

.sidebar {
  padding: 20px;

  align-self: start;

  position: sticky;

  top: 14px;
}

.sidebar h3 {
  margin-bottom: 5px;
}

.sidebar-user {
  margin-bottom: 18px;

  color: var(--muted);

  font-size: 12px;
}

.stats {
  display: grid;

  gap: 9px;
}

.stat {
  padding: 12px;

  border-radius: 13px;

  background: #f4f8f9;
}

.stat strong {
  display: block;

  font-size: 22px;
}

.stat span {
  font-size: 11px;

  color: var(--muted);
}

.admin-main {
  display: grid;

  gap: 18px;
}

.panel {
  padding: 20px;
}

.panel-title {
  display: flex;
  align-items: center;

  justify-content:
    space-between;

  gap: 15px;

  margin-bottom: 14px;
}

.panel-title h2 {
  margin: 0;

  font-size: 19px;
}

.admin-question {
  padding: 16px;

  border-top:
    1px solid
    var(--line);
}

.admin-question:first-child {
  border-top: 0;
}

.admin-actions {
  display: flex;

  flex-wrap: wrap;

  gap: 7px;

  margin-top: 12px;
}

.reply-box {
  margin-top: 12px;

  display: flex;

  gap: 8px;
}

.reply-box .input {
  flex: 1;
}

.hidden-question {
  opacity: .48;
}

.login-wrap {
  width:
    min(
      460px,
      calc(100% - 28px)
    );

  margin:
    90px auto;

  padding: 34px;
}

.emission-layout {
  display: grid;

  grid-template-columns:
    minmax(0,1fr)
    430px;

  gap: 20px;

  padding-bottom: 50px;
}

.emission-main {
  display: grid;

  gap: 18px;

  align-content: start;
}

.controls {
  padding: 20px;
}

.control-grid {
  display: grid;

  grid-template-columns:
    1fr 1fr;

  gap: 12px;
}

.preview-card {
  padding: 16px;
}

.preview-video {
  display: block;

  width: 100%;

  min-height: 440px;

  max-height:
    calc(100vh - 260px);

  border-radius: 18px;

  background: #071f29;

  object-fit: contain;
}

.status-line {
  margin-top: 15px;

  padding: 12px;

  border-radius: 12px;

  background: #f1f7f8;

  font-size: 12px;

  color: var(--muted);
}

.staff-list {
  display: grid;

  gap: 10px;

  margin-top: 15px;
}

.staff-row {
  display: grid;

  grid-template-columns:
    minmax(0,1fr)
    auto;

  gap: 12px;

  align-items: center;

  padding: 13px;

  border:
    1px solid
    var(--line);

  border-radius: 14px;
}

.staff-meta strong {
  display: block;
}

.staff-meta span {
  display: block;

  margin-top: 3px;

  color: var(--muted);

  font-size: 11px;
}

.staff-badges {
  display: flex;

  flex-wrap: wrap;

  gap: 5px;

  margin-top: 7px;
}

.badge {
  display: inline-flex;

  align-items: center;

  min-height: 25px;

  padding:
    0 8px;

  border-radius: 999px;

  background: #eef6f8;

  color: #37616d;

  font-size: 10px;

  font-weight: 750;
}

.badge.admin {
  background: #e9f4ff;

  color: #2466a2;
}

.badge.camera {
  background: #eaf8f1;

  color: #1c785c;
}

.badge.off {
  background: #fff0f0;

  color: #a83b3b;
}

.inline-form {
  display: grid;

  grid-template-columns:
    1fr 1fr;

  gap: 10px;
}

@media (
  max-width: 1000px
) {
  .event-layout,
  .admin-layout,
  .emission-layout {
    grid-template-columns: 1fr;
  }

  .chat {
    height: auto;

    min-height: 650px;
  }

  .stage {
    min-height: auto;
  }

  .video-placeholder {
    min-height: 340px;
  }

  .sidebar {
    position: static;
  }
}

@media (
  max-width: 700px
) {
  .shell {
    width:
      min(
        100% - 18px,
        1220px
      );
  }

  .register-card {
    padding:
      27px 20px;
  }

  .topbar {
    min-height: 64px;
  }

  .brand span {
    display: none;
  }

  .live-badge {
    display: none;
  }

  .stage {
    padding: 10px;
  }

  .video-placeholder {
    min-height: 240px;
  }

  .event-layout {
    gap: 10px;
  }

  .chat {
    min-height:
      calc(100vh - 85px);
  }

  .reply-box,
  .composer-row,
  .control-grid,
  .inline-form {
    grid-template-columns: 1fr;

    flex-direction: column;

    align-items: stretch;
  }

  .top-actions {
    margin-left: auto;
  }
}

/* IMPCHILE-WEBRTC-STYLES */

.video-live-wrap {
  width: 100%;
  height: 100%;
  min-height: 525px;

  position: relative;

  overflow: hidden;

  border-radius: 19px;

  background:
    linear-gradient(
      145deg,
      #041e29,
      #073d4d
    );
}

.live-video {
  width: 100%;
  height: 100%;

  min-height: 525px;

  display: block;

  object-fit: contain;

  background: #03151d;
}

.video-overlay {
  position: absolute;

  inset: 0;

  display: grid;
  place-items: center;

  padding: 30px;

  text-align: center;

  color: white;

  background:
    radial-gradient(
      circle at 50% 40%,
      rgba(22,166,184,.18),
      transparent 35%
    );
}

.video-overlay.hidden {
  display: none;
}

.video-overlay strong {
  display: block;

  margin-bottom: 8px;

  font-size: 28px;
}

.video-overlay span {
  color:
    rgba(
      255,
      255,
      255,
      .7
    );
}

.audio-enable {
  position: absolute;

  left: 16px;
  bottom: 16px;

  z-index: 3;
}

.broadcast-live {
  color: #177757;
}

.broadcast-error {
  color: #b33232;
}

@media (max-width: 1000px) {
  .video-live-wrap,
  .live-video {
    min-height: 340px;
  }
}

@media (max-width: 700px) {
  .video-live-wrap,
  .live-video {
    min-height: 240px;
  }
}


/* IMPCHILE-LOGO-AUDIO-V3 */

.imp-brand {
  min-width: 0;
}

.imp-logo {
  display: block;
  width: 185px;
  max-width: 36vw;
  height: auto;
  object-fit: contain;
}

.brand-user {
  min-width: 0;
}

.brand-user span {
  display: block;
  max-width: 290px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 11px;
}

.audio-enable {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.audio-enable.is-on {
  background: rgba(255,255,255,.94);
  color: #17333c;
}

.video-live-wrap.has-video .video-overlay {
  display: none !important;
}

@media (max-width: 700px) {

  .imp-logo {
    width: 145px;
    max-width: 48vw;
  }

  .brand-user {
    display: none;
  }

}

/* IMPCHILE-MODERATOR-MENU-V4 */

.mod-layout {
  display: grid;
  grid-template-columns: 235px minmax(0,1fr);
  gap: 20px;
  padding-bottom: 50px;
}

.mod-menu {
  position: sticky;
  top: 14px;
  align-self: start;

  padding: 14px;
}

.mod-user {
  padding: 10px 9px 17px;
  margin-bottom: 8px;

  border-bottom:
    1px solid var(--line);
}

.mod-user strong {
  display: block;
}

.mod-user span {
  display: block;
  margin-top: 3px;

  color: var(--muted);
  font-size: 11px;
}

.mod-nav {
  display: grid;
  gap: 5px;
}

.mod-nav-button {
  width: 100%;
  min-height: 45px;

  display: flex;
  align-items: center;
  gap: 10px;

  border: 0;
  border-radius: 12px;

  padding: 0 13px;

  background: transparent;
  color: #4e6970;

  text-align: left;
  font-weight: 650;
}

.mod-nav-button:hover {
  background: #f1f7f8;
}

.mod-nav-button.active {
  background: #e8f5f7;
  color: var(--blue);
}

.mod-content {
  min-width: 0;
}

.mod-section {
  display: none;
}

.mod-section.active {
  display: block;
}

.dashboard-grid {
  display: grid;

  grid-template-columns:
    repeat(5,minmax(0,1fr));

  gap: 10px;
}

.dashboard-stat {
  padding: 18px;

  border: 1px solid var(--line);
  border-radius: 17px;

  background: #fff;
}

.dashboard-stat strong {
  display: block;

  font-size: 29px;
}

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

.question-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.filter-button.active {
  background: var(--blue);
  color: white;
}

.danger-zone {
  margin-top: 20px;

  padding: 16px;

  border:
    1px solid #ffd0d0;

  border-radius: 16px;

  background: #fff8f8;
}

.danger-zone h3 {
  color: #9f3232;
}

.toast-stack {
  position: fixed;

  top: 18px;
  right: 18px;

  width: min(
    390px,
    calc(100% - 36px)
  );

  z-index: 99999;

  display: grid;
  gap: 9px;
}

.app-toast {
  padding: 14px 16px;

  border: 1px solid #cfe5e9;
  border-radius: 15px;

  background: #fff;

  box-shadow:
    0 18px 50px
    rgba(9,50,65,.18);

  animation:
    toastIn .2s ease-out;
}

.app-toast strong {
  display: block;
  margin-bottom: 3px;

  color: var(--navy);
}

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

.app-toast.answer {
  border-color: #97d9c6;

  background: #f4fcf8;
}

.app-toast.new-question {
  border-color: #9fdce6;

  background: #f4fbfc;
}

@keyframes toastIn {
  from {
    transform:
      translateY(-8px);
    opacity: 0;
  }

  to {
    transform:
      translateY(0);
    opacity: 1;
  }
}

.question-id-anchor {
  scroll-margin-top: 90px;
}

.response-tools {
  display: flex;
  justify-content: flex-end;
  margin-top: 5px;
}

.reply-delete {
  min-height: 25px;

  border: 0;

  background: transparent;
  color: #a54a4a;

  font-size: 10px;
}

.tool-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.menu-badge {
  margin-left: auto;

  min-width: 21px;
  height: 21px;

  display: inline-grid;
  place-items: center;

  padding: 0 5px;

  border-radius: 999px;

  background: #e34141;
  color: white;

  font-size: 10px;
}

@media (max-width: 1000px) {

  .mod-layout {
    grid-template-columns: 1fr;
  }

  .mod-menu {
    position: static;
  }

  .mod-nav {
    grid-template-columns:
      repeat(3,1fr);
  }

  .mod-nav-button {
    justify-content: center;
  }

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

}

@media (max-width: 600px) {

  .mod-nav {
    grid-template-columns:
      repeat(2,1fr);
  }

  .mod-nav-button {
    font-size: 12px;
  }

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

}
