/* Copied from nafo.blog homepage inline rules needed by the finance hero image. */
.finance-hero-copy {
  position: relative;
  overflow: hidden;
  background: linear-gradient(90deg, rgba(255, 255, 255, .96) 0%, rgba(255, 255, 255, .92) 52%, rgba(255, 255, 255, .58) 100%);
}

.finance-hero-copy > * {
  position: relative;
  z-index: 1;
}

.finance-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center right;
  z-index: 0;
  opacity: .42;
}

html[data-theme="dark"] .finance-hero-copy {
  background: linear-gradient(90deg, rgba(8, 18, 30, .96) 0%, rgba(8, 18, 30, .88) 50%, rgba(8, 18, 30, .42) 100%);
}

html[data-theme="dark"] .finance-hero-bg {
  opacity: .34;
}

header.header .input {
  width: auto;
  background: rgba(15, 23, 42, .45);
  color: #eef2f7;
  border: 1px solid rgba(148, 163, 184, .22);
  border-radius: 999px;
  padding: 6px 32px 6px 11px;
  font-weight: 700;
}

html[data-theme="light"] header.header .input {
  background: #ffffff;
  color: #0f172a;
  border-color: #dbe3ef;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.portal-hub {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.portal-card {
  display: grid;
  gap: 6px;
  min-height: 116px;
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 8px;
  background: #0d1a29;
  color: #e5eefb;
  text-decoration: none;
}

.portal-card strong {
  font-size: 18px;
  color: #f8fafc;
}

.portal-card span {
  color: #94a3b8;
  line-height: 1.45;
}

.portal-card:hover {
  border-color: #2dd4bf;
}

.market-table-panel {
  padding: 22px;
}

.market-table-wrap {
  overflow: auto;
  border: 1px solid rgba(148, 163, 184, .16);
  border-radius: 8px;
  background: rgba(8, 18, 30, .48);
}

.market-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 860px;
  table-layout: fixed;
}

.market-table th,
.market-table td {
  padding: 0 14px;
  border-bottom: 1px solid rgba(148, 163, 184, .12);
  white-space: nowrap;
}

.market-table tbody tr:last-child td {
  border-bottom: 0;
}

.market-table th {
  height: 40px;
  color: #94a3b8;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  background: rgba(15, 23, 42, .62);
  text-align: center;
}

.market-table td {
  height: 76px;
  color: #e5eefb;
  text-align: center;
  background: rgba(15, 23, 42, .28);
  border-left: 1px solid rgba(148, 163, 184, .08);
}

.market-table .empty-state {
  color: #94a3b8;
}

html[data-theme="light"] .portal-card {
  background: #f8fafc;
  border-color: #dbe3ef;
  color: #0f172a;
}

html[data-theme="light"] .portal-card strong {
  color: #0f172a;
}

html[data-theme="light"] .portal-card span {
  color: #475569;
}

html[data-theme="light"] .market-table-wrap {
  background: #f8fafc;
  border-color: #dbe3ef;
}

html[data-theme="light"] .market-table th {
  background: #f1f5f9;
}

html[data-theme="light"] .market-table td {
  background: #f8fafc;
  border-left-color: #dbe3ef;
  color: #475569;
}

@media (max-width: 1200px) {
  .portal-hub {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .portal-hub {
    grid-template-columns: 1fr 1fr;
  }
}

.signal-admin-form {
  max-width: 620px;
}

.signal-admin-form h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.15;
}

.signal-admin-form form {
  display: grid;
  gap: 10px;
}

.signal-admin-form label {
  margin: 8px 0 0;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 800;
}

.form-error {
  margin: 0 0 12px;
  padding: 12px;
  border: 1px solid rgba(239, 68, 68, .3);
  border-radius: 8px;
  background: rgba(239, 68, 68, .08);
  color: #fecaca;
  font-weight: 800;
}

html[data-theme="light"] .signal-admin-form label {
  color: #64748b;
}

html[data-theme="light"] .form-error {
  background: #fff1f2;
  border-color: #fecdd3;
  color: #991b1b;
}

.form-notice {
  margin: 0 0 12px;
  padding: 12px;
  border: 1px solid rgba(20, 184, 166, .3);
  border-radius: 8px;
  background: rgba(20, 184, 166, .08);
  color: #99f6e4;
  font-weight: 800;
}

html[data-theme="light"] .form-notice {
  background: #f0fdfa;
  border-color: #99f6e4;
  color: #0f766e;
}

.signal-admin-page {
  gap: 18px;
}

.signal-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
}

.signal-admin-form textarea.input {
  min-height: 120px;
  resize: vertical;
}

.source-checks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 10px 0 0;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 8px;
}

.source-checks legend {
  padding: 0 8px;
  color: #94a3b8;
  font-weight: 800;
}

.source-checks label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.signal-admin-table td {
  height: auto;
  min-height: 76px;
  padding-top: 12px;
  padding-bottom: 12px;
}

.signal-admin-table td strong {
  color: inherit;
}

.signal-admin-table td span {
  color: #94a3b8;
}

.inline-status-form {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
}

.inline-status-form .input {
  min-width: 126px;
}

html[data-theme="light"] .source-checks {
  border-color: #dbe3ef;
}

html[data-theme="light"] .source-checks legend,
html[data-theme="light"] .signal-admin-table td span {
  color: #64748b;
}

@media (max-width: 760px) {
  .signal-form-grid,
  .source-checks {
    grid-template-columns: 1fr;
  }

  .inline-status-form {
    align-items: stretch;
    flex-direction: column;
  }
}
