/* FLAITOPS — BriefingReportModal (presentation shell) */

html.brm-scroll-lock,
body.brm-scroll-lock {
  overflow: hidden !important;
}

.brm-host {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Segoe UI", system-ui, sans-serif;
}

.brm-host[hidden] {
  display: none !important;
}

.brm-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 10, 16, 0.42);
  backdrop-filter: blur(14px) saturate(1.05);
  -webkit-backdrop-filter: blur(14px) saturate(1.05);
}

.brm-dialog {
  position: relative;
  z-index: 1;
  width: min(1480px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  height: min(92vh, calc(100vh - 48px));
  display: flex;
  flex-direction: column;
  color: #eef3f5;
  border: 1px solid rgba(238, 243, 245, 0.14);
  border-radius: 20px;
  background: rgba(12, 18, 24, 0.92);
  backdrop-filter: blur(28px) saturate(1.15);
  -webkit-backdrop-filter: blur(28px) saturate(1.15);
  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  outline: none;
  overflow: hidden;
}

.brm-dialog.is-maximized {
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  border-radius: 0;
  background: rgba(10, 16, 22, 0.72);
}

.brm-header {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.1rem 0.65rem;
  border-bottom: 1px solid rgba(238, 243, 245, 0.1);
  background: transparent;
}

.brm-brand {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  min-width: 0;
}

.brm-logo {
  color: #45ff60;
  font-weight: 800;
  letter-spacing: 0.06em;
  font-size: 0.85rem;
  margin-top: 0.2rem;
  flex: 0 0 auto;
}

.brm-logo-img {
  display: block;
  width: auto;
  height: 28px;
  max-width: 148px;
  object-fit: contain;
  flex: 0 0 auto;
  margin-top: 0.15rem;
}

.brm-titles {
  min-width: 0;
}

.brm-titles h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 650;
  line-height: 1.35;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.brm-sub {
  margin: 0.25rem 0 0;
  font-size: 0.78rem;
  color: #8b989e;
}

.brm-status {
  display: inline-flex;
  align-items: center;
  padding: 0.12rem 0.55rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  border: 1px solid transparent;
}

.brm-status.is-gen {
  color: #9ad4b0;
  border-color: rgba(154, 212, 176, 0.4);
  background: rgba(46, 204, 113, 0.1);
}

.brm-status.is-preview {
  color: #2ecc71;
  border-color: rgba(46, 204, 113, 0.45);
  background: rgba(46, 204, 113, 0.12);
}

.brm-status.is-ok {
  color: #9ad4b0;
  border-color: rgba(154, 212, 176, 0.35);
  background: rgba(46, 204, 113, 0.08);
}

.brm-status.is-warn {
  color: #e8c56a;
  border-color: rgba(232, 197, 106, 0.4);
  background: rgba(232, 197, 106, 0.1);
}

.brm-status.is-fail {
  color: #f07178;
  border-color: rgba(240, 113, 120, 0.45);
  background: rgba(240, 113, 120, 0.1);
}

.brm-window-acts {
  display: flex;
  gap: 0.25rem;
  flex: 0 0 auto;
}

.brm-icon-btn {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(238, 243, 245, 0.12);
  border-radius: 999px;
  background: rgba(8, 14, 20, 0.35);
  color: rgba(238, 243, 245, 0.72);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.brm-icon-btn:hover,
.brm-icon-btn:focus-visible {
  color: #eef3f5;
  border-color: rgba(238, 243, 245, 0.22);
  background: rgba(8, 14, 20, 0.55);
  outline: none;
}

.brm-status-strip {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1.1rem;
  align-items: center;
  padding: 0.55rem 1.1rem;
  border-bottom: 1px solid rgba(238, 243, 245, 0.1);
  background: rgba(6, 12, 18, 0.35);
}

.brm-strip-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(198, 208, 216, 0.88);
}

.brm-strip-item .material-symbols-rounded {
  font-size: 1rem;
  opacity: 0.85;
}

.brm-strip-item.is-amber {
  color: #e8c56a;
}

.brm-nav {
  flex: 0 0 auto;
  display: flex;
  gap: 0.35rem;
  padding: 0.45rem 1rem;
  border-bottom: 1px solid rgba(238, 243, 245, 0.1);
  background: transparent;
  overflow-x: auto;
}

.brm-nav-btn {
  border: 1px solid transparent;
  background: transparent;
  color: rgba(198, 208, 216, 0.72);
  font-size: 0.82rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}

.brm-nav-btn.is-active,
.brm-nav-btn:hover,
.brm-nav-btn:focus-visible {
  color: #eef3f5;
  border-color: rgba(238, 243, 245, 0.14);
  background: rgba(6, 12, 18, 0.4);
  outline: none;
}

.brm-nav-btn.is-active {
  border-color: rgba(69, 255, 96, 0.35);
  background: rgba(69, 255, 96, 0.1);
  box-shadow: none;
}

.brm-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  background: transparent;
}

.brm-frame {
  flex: 1 1 auto;
  width: calc(100% - 1.5rem);
  min-height: 420px;
  margin: 0.65rem 0.75rem 0.75rem;
  border: 1px solid rgba(238, 243, 245, 0.12);
  border-radius: 16px;
  background: #071018;
  overflow: hidden;
}

.brm-btn .material-symbols-rounded {
  font-size: 1.05rem;
  vertical-align: -3px;
  margin-right: 0.15rem;
}

.brm-qc {
  flex: 0 0 auto;
  padding: 0.85rem 1rem 1.1rem;
  border-top: 1px solid rgba(238, 243, 245, 0.1);
  background: transparent;
}

.brm-qc h3 {
  margin: 0 0 0.35rem;
  font-size: 0.9rem;
}

.brm-qc p {
  margin: 0 0 0.55rem;
  color: #8b989e;
  font-size: 0.78rem;
}

.brm-qc-wrap {
  overflow: auto;
  max-height: 180px;
  border: 1px solid rgba(238, 243, 245, 0.12);
  border-radius: 12px;
  background: rgba(6, 12, 18, 0.35);
}

.brm-qc table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.75rem;
}

.brm-qc th,
.brm-qc td {
  padding: 0.4rem 0.55rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  text-align: left;
  vertical-align: top;
}

.brm-qc th {
  color: #8b989e;
  font-weight: 600;
  position: sticky;
  top: 0;
  background: rgba(10, 16, 22, 0.92);
}

.brm-footer {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 1rem;
  border-top: 1px solid rgba(238, 243, 245, 0.1);
  background: transparent;
}

.brm-save {
  margin: 0;
  font-size: 0.78rem;
  color: #8b989e;
}

.brm-footer-acts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  justify-content: flex-end;
  padding: 0.35rem;
  border: 1px solid rgba(238, 243, 245, 0.12);
  border-radius: 999px;
  background: rgba(6, 12, 18, 0.35);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.brm-btn {
  border: 1px solid rgba(238, 243, 245, 0.12);
  background: rgba(6, 12, 18, 0.4);
  color: #eef3f5;
  font-size: 0.82rem;
  padding: 0.5rem 0.95rem;
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.brm-btn:hover,
.brm-btn:focus-visible {
  border-color: rgba(238, 243, 245, 0.22);
  background: rgba(6, 12, 18, 0.55);
  outline: none;
  transform: translateY(-1px);
}

.brm-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.brm-btn--primary {
  background: #45ff60;
  border-color: #45ff60;
  color: #041015;
  font-weight: 700;
}

.brm-btn--primary:hover,
.brm-btn--primary:focus-visible {
  background: #45ff60;
  filter: brightness(1.04);
  box-shadow: 0 14px 34px rgba(69, 255, 96, 0.24);
}

.brm-copy-wrap {
  position: relative;
}

.brm-copy-menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 6px);
  min-width: 240px;
  background: rgba(18, 26, 32, 0.72);
  backdrop-filter: blur(20px) saturate(1.1);
  -webkit-backdrop-filter: blur(20px) saturate(1.1);
  border: 1px solid rgba(238, 243, 245, 0.14);
  border-radius: 16px;
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  padding: 0.35rem;
  z-index: 2;
}

.brm-copy-menu button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: #e8eef2;
  padding: 0.5rem 0.65rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8rem;
}

.brm-copy-menu button:hover,
.brm-copy-menu button:focus-visible {
  background: rgba(46, 204, 113, 0.14);
  outline: none;
}

.brm-email-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 10, 16, 0.35);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 3;
}

.brm-email {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(420px, calc(100% - 2rem));
  background: rgba(18, 26, 32, 0.52);
  backdrop-filter: blur(28px) saturate(1.15);
  -webkit-backdrop-filter: blur(28px) saturate(1.15);
  border: 1px solid rgba(238, 243, 245, 0.14);
  border-radius: 24px;
  padding: 1.15rem 1.2rem 1.1rem;
  z-index: 4;
  box-shadow:
    0 28px 70px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.brm-email h3 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
}

.brm-email label {
  display: block;
  font-size: 0.78rem;
  color: #8b989e;
  margin-bottom: 0.65rem;
}

.brm-email input[type="email"],
.brm-email input[type="text"] {
  display: block;
  width: 100%;
  margin-top: 0.3rem;
  height: 44px;
  padding: 0 1rem;
  border-radius: 14px;
  border: 1px solid rgba(238, 243, 245, 0.12);
  background: rgba(6, 12, 18, 0.48);
  color: #eef3f5;
  outline: none;
}

.brm-email input[type="email"]:focus,
.brm-email input[type="text"]:focus {
  border-color: rgba(120, 190, 255, 0.72);
  box-shadow: 0 0 0 3px rgba(90, 170, 255, 0.18);
  background: rgba(6, 12, 18, 0.58);
}

.brm-check {
  display: flex !important;
  align-items: center;
  gap: 0.45rem;
  color: #c5ced4 !important;
}

.brm-email-block {
  color: #f07178;
  font-size: 0.82rem;
  margin: 0 0 0.75rem;
}

.brm-email-warn {
  color: #e8c56a;
  font-size: 0.8rem;
  margin: 0 0 0.75rem;
}

.brm-email-acts {
  display: flex;
  justify-content: flex-end;
  gap: 0.45rem;
  margin-top: 0.85rem;
}

.brm-body.is-generating {
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
}

.brm-gen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: min(280px, 86%);
  padding: 1.5rem 1.4rem 1.35rem;
  border: 1px solid rgba(238, 243, 245, 0.14);
  border-radius: 20px;
  background: rgba(18, 26, 32, 0.42);
  backdrop-filter: blur(18px) saturate(1.1);
  -webkit-backdrop-filter: blur(18px) saturate(1.1);
  box-shadow:
    0 18px 48px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  text-align: center;
}

.brm-gen .flaitops-load-mark,
.brm-gen .loader {
  margin: 0 auto;
}

.brm-gen-pct {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #eef3f5;
  font-variant-numeric: tabular-nums;
}

.brm-gen-label {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(198, 208, 216, 0.85);
}

.brm-gen-detail {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.4;
  color: #8b989e;
}

.brm-gen--error .brm-gen-alert {
  font-size: 2rem;
  color: #e6c87a;
}

.brm-gen-err {
  color: #f07178;
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.4;
}

.brm-gen-acts {
  display: flex;
  gap: 0.45rem;
  margin-top: 0.35rem;
}

@media (max-width: 960px) {
  .brm-dialog:not(.is-maximized) {
    width: 94vw;
    height: 92vh;
  }
}

.brm-show-sm {
  display: none;
}

.brm-more-wrap {
  position: relative;
}

@media (max-width: 640px) {
  .brm-dialog {
    width: 100vw !important;
    height: 100vh !important;
    border-radius: 0 !important;
  }

  .brm-header {
    flex-wrap: wrap;
  }

  .brm-sub {
    display: none;
  }

  .brm-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .brm-footer-acts {
    justify-content: stretch;
  }

  .brm-footer-acts .brm-btn {
    flex: 1 1 auto;
  }

  .brm-hide-sm {
    display: none !important;
  }

  .brm-show-sm {
    display: block;
  }

  .brm-frame {
    min-height: 280px;
  }
}
