/* Console portal layout (extends site Signal tokens via /styles.css) */
.hidden { display: none !important; }

.portal-main {
  width: min(1280px, calc(100% - 2rem));
  margin: 2.5rem auto 4rem;
}

.portal-auth,
.portal-head,
.portal-card {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(11, 31, 23, 0.08);
  border-radius: 16px;
  padding: 1.25rem 1.35rem;
  backdrop-filter: blur(8px);
}

.portal-auth h1,
.portal-head h1 {
  font-family: Outfit, sans-serif;
  margin: 0 0 0.5rem;
}

.portal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.portal-card {
  margin-top: 1rem;
}

.portal-card label,
.portal-auth label {
  display: block;
  margin: 0.75rem 0 0.35rem;
  font-size: 0.9rem;
  color: #355245;
}

.portal-card input,
.portal-auth input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(11, 31, 23, 0.14);
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  background: #fff;
  font: inherit;
}

.portal-grid.two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

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

.tabs {
  display: flex;
  gap: 0.35rem;
  margin: 1rem 0;
}

.tab {
  border: 0;
  background: transparent;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  cursor: pointer;
  color: #355245;
}

.tab.active {
  background: #0b1f17;
  color: #e8f6b8;
}

.quota-bar {
  margin-top: 0.75rem;
  height: 8px;
  border-radius: 999px;
  background: rgba(11, 31, 23, 0.08);
  overflow: hidden;
}

.quota-bar > i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #7cb518, #c6e26e);
}

.muted { color: #5c7468; }
.msg {
  margin-top: 0.85rem;
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  background: rgba(124, 181, 24, 0.12);
}
.msg.err { background: rgba(180, 50, 40, 0.12); color: #8a1f16; }

.portal-card table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.portal-card .table-scroll {
  overflow: auto;
  max-width: 100%;
}
.portal-card th,
.portal-card td {
  text-align: left;
  padding: 0.55rem 0.35rem;
  border-bottom: 1px solid rgba(11, 31, 23, 0.08);
  vertical-align: top;
}
.portal-card td.wrap {
  word-break: break-all;
  overflow-wrap: anywhere;
}
.portal-card pre {
  overflow: auto;
  background: #0f1c14;
  color: #d7f0cf;
  padding: 0.85rem;
  border-radius: 10px;
  font-size: 0.82rem;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
  font-size: 0.92rem;
}
.check-row input { width: auto; }

.preview-line {
  margin: 0.4rem 0 0.75rem;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.82rem;
  word-break: break-all;
}

.portal-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(12, 24, 18, 0.45);
}
.portal-modal.hidden { display: none !important; }
.portal-modal-card {
  width: min(920px, 100%);
  max-height: 85vh;
  overflow: auto;
  background: #f7faf6;
  border: 1px solid rgba(20, 50, 35, 0.12);
  border-radius: 12px;
  padding: 1rem 1.1rem;
}
.portal-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
}
.log-body {
  margin: 0;
  max-height: 60vh;
  overflow: auto;
  font-size: 0.78rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
  background: #0f1c14;
  color: #d7f0cf;
  padding: 0.85rem;
  border-radius: 8px;
}
.btn-sm { padding: 0.35rem 0.65rem; font-size: 0.82rem; }
.actions-cell { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.row { display: flex; gap: 0.5rem; align-items: center; }

.stats-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.stats-sub {
  margin: 0.45rem 0 0.85rem;
  font-size: 0.9rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

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

@media (max-width: 520px) {
  .stats-grid { grid-template-columns: 1fr; }
}

.stat-cell {
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(11, 31, 23, 0.08);
  border-radius: 12px;
  padding: 0.85rem 0.9rem;
}

.stat-cell.wide { grid-column: span 2; }
@media (max-width: 520px) {
  .stat-cell.wide { grid-column: span 1; }
}

.stat-label {
  font-size: 0.78rem;
  color: #355245;
}

.stat-value {
  font-family: Outfit, sans-serif;
  font-size: 1.45rem;
  font-weight: 700;
  margin-top: 0.25rem;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}

.stat-hint {
  margin-top: 0.2rem;
  font-size: 0.75rem;
  color: #6b7f74;
}

.stats-tops {
  margin-top: 1rem;
}

.stats-tops-title {
  font-size: 0.88rem;
  margin-bottom: 0.45rem;
  color: #355245;
}

.stats-note {
  margin: 0.85rem 0 0;
  font-size: 0.78rem;
}
