﻿/* ============================================================
   NOETION — NOEN-01 ENTITY CONSOLE
============================================================ */

.entity-page {
  min-height: 100vh;
  background:
    radial-gradient(
      circle at 50% 20%,
      rgba(0, 255, 184, 0.06),
      transparent 34%
    ),
    #050607;
  color: #f0f3f2;
}


/* NAV */

.entity-nav {
  max-width: 1500px;
  height: 72px;
  margin: auto;

  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;

  padding: 0 26px;

  border-bottom: 1px solid #17201f;
}

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

  font-weight: 800;
  letter-spacing: 0.19em;
}

.entity-brand img {
  width: 34px;
  height: 34px;
}

.entity-nav-center {
  font-family: monospace;
  font-size: 10px;
  letter-spacing: 0.16em;
  color: #63706d;
}

.entity-back {
  justify-self: end;

  padding: 10px 14px;

  border: 1px solid #1b4b3d;

  color: #00ffb8;

  font-family: monospace;
  font-size: 9px;
  letter-spacing: 0.12em;
}


/* MAIN GRID */

.entity-layout {
  max-width: 1500px;
  min-height: calc(100vh - 72px);

  margin: auto;

  display: grid;

  grid-template-columns:
    260px
    minmax(500px, 1fr)
    280px;

  border-left: 1px solid #17201f;
  border-right: 1px solid #17201f;
}


/* LEFT */

.entity-sidebar {
  background: #07090a;

  border-right: 1px solid #17201f;
}

.entity-orb-wrap {
  height: 270px;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  border-bottom: 1px solid #17201f;
}

.entity-orb {
  width: 128px;
  height: 128px;

  position: relative;

  display: grid;
  place-items: center;

  border-radius: 50%;

  border: 1px solid #21473d;

  box-shadow:
    inset 0 0 50px rgba(0,255,184,.05),
    0 0 40px rgba(0,255,184,.03);
}

.entity-orb-ring {
  position: absolute;

  border-radius: 50%;

  border: 1px solid #17352c;
}

.ring-a {
  width: 90px;
  height: 90px;
}

.ring-b {
  width: 55px;
  height: 55px;
}

.entity-orb-core {
  width: 8px;
  height: 40px;

  background: #00ffb8;

  box-shadow:
    0 0 15px #00ffb8,
    0 0 42px rgba(0,255,184,.65);
}

.entity-orb-wrap > span {
  margin-top: 22px;

  font-size: 14px;
  letter-spacing: .16em;
}

.entity-orb-wrap small {
  margin-top: 6px;

  font-family: monospace;
  font-size: 9px;
  letter-spacing: .13em;

  color: #596561;
}


.state-block {
  padding: 22px;

  border-bottom: 1px solid #17201f;
}

.state-title {
  margin-bottom: 12px;

  color: #66716e;

  font-family: monospace;
  font-size: 9px;
  letter-spacing: .16em;
}

.state-row {
  min-height: 35px;

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

  gap: 12px;

  border-bottom: 1px solid #111817;
}

.state-row span,
.state-row b {
  font-family: monospace;

  font-size: 9px;

  letter-spacing: .07em;
}

.state-row span {
  color: #66716f;
}

.state-row b {
  color: #b8c1bf;

  text-align: right;
}

.state-row .green {
  color: #00ffb8;
}


.genesis-rule {
  padding: 22px;
}

.genesis-rule > span {
  font-family: monospace;

  font-size: 9px;

  letter-spacing: .16em;

  color: #66716e;
}

.genesis-rule p {
  margin-top: 16px;

  color: #7e8986;

  font-family: monospace;

  font-size: 10px;

  line-height: 1.8;
}


/* CENTER */

.entity-console {
  display: flex;
  flex-direction: column;

  min-width: 0;

  background:
    linear-gradient(
      180deg,
      #080b0c,
      #050607
    );
}

.console-header {
  height: 72px;

  padding: 0 22px;

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

  border-bottom: 1px solid #17201f;
}

.console-header > div:first-child {
  display: flex;
  flex-direction: column;

  gap: 5px;
}

.console-header small {
  color: #5c6965;

  font-family: monospace;

  font-size: 9px;

  letter-spacing: .13em;
}

.console-header strong {
  font-size: 12px;

  letter-spacing: .14em;
}


.online-state {
  display: flex;

  align-items: center;

  gap: 8px;

  color: #64706d;

  font-family: monospace;

  font-size: 9px;

  letter-spacing: .1em;
}

.online-state i {
  width: 7px;
  height: 7px;

  border-radius: 50%;

  background: #55605d;
}

.online-state.active {
  color: #00ffb8;
}

.online-state.active i {
  background: #00ffb8;

  box-shadow:
    0 0 14px #00ffb8;
}


/* MESSAGES */

.chat-messages {
  flex: 1;

  height: calc(100vh - 310px);

  min-height: 420px;

  overflow-y: auto;

  padding:
    34px
    clamp(20px, 5vw, 70px);
}

.message {
  max-width: 780px;

  margin-bottom: 28px;
}

.message-meta {
  margin-bottom: 8px;

  color: #53605d;

  font-family: monospace;

  font-size: 9px;

  letter-spacing: .12em;
}

.message-content {
  padding: 17px 19px;

  border: 1px solid #17211f;

  background: #070a0a;

  color: #bac3c1;

  font-size: 14px;

  line-height: 1.7;
}

.entity-message .message-meta {
  color: #00ffb8;
}

.entity-message .message-content {
  border-left: 2px solid #00ffb8;
}

.user-message {
  margin-left: auto;
}

.user-message .message-meta {
  text-align: right;
}

.user-message .message-content {
  background: #0b1010;
}


/* QUICK COMMANDS */

.quick-commands {
  padding: 0 22px 12px;

  display: flex;

  gap: 8px;

  overflow-x: auto;
}

.quick-commands button {
  border: 1px solid #173128;

  background: #07100d;

  padding: 8px 10px;

  color: #759188;

  font-family: monospace;

  font-size: 8px;

  letter-spacing: .08em;

  white-space: nowrap;

  cursor: pointer;
}

.quick-commands button:hover {
  color: #00ffb8;

  border-color: #28614f;
}


/* INPUT */

.entity-input {
  margin: 0 22px;

  padding: 10px;

  display: grid;

  grid-template-columns:
    auto
    1fr
    auto;

  align-items: end;

  gap: 10px;

  border: 1px solid #29443c;

  background: #030605;
}

.prompt-sign {
  padding: 8px 0;

  color: #00ffb8;

  font-family: monospace;

  font-size: 17px;
}

.entity-input textarea {
  min-height: 35px;

  max-height: 140px;

  padding: 8px;

  border: 0;

  outline: 0;

  resize: none;

  background: transparent;

  color: #e9f4f1;

  font-family: monospace;

  font-size: 13px;

  line-height: 1.5;
}

.entity-input button {
  padding: 12px 14px;

  border: 0;

  background: #00ffb8;

  color: #02120c;

  font-family: monospace;

  font-size: 9px;

  font-weight: 800;

  letter-spacing: .11em;

  cursor: pointer;
}

.entity-input button:disabled {
  opacity: .4;

  cursor: wait;
}


.console-warning {
  padding: 11px 22px 18px;

  color: #4e5b58;

  font-family: monospace;

  font-size: 8px;

  letter-spacing: .06em;
}


/* MEMORY */

.memory-sidebar {
  display: flex;

  flex-direction: column;

  background: #07090a;

  border-left: 1px solid #17201f;
}

.memory-header {
  height: 72px;

  padding: 0 16px;

  display: flex;

  justify-content: space-between;

  align-items: center;

  border-bottom: 1px solid #17201f;
}

.memory-header span,
.memory-header b {
  font-family: monospace;

  font-size: 8px;

  letter-spacing: .1em;
}

.memory-header span {
  color: #66716e;
}

.memory-header b {
  color: #75817e;
}


.memory-items {
  flex: 1;

  overflow-y: auto;

  padding: 12px;
}

.memory-empty {
  padding: 12px;

  color: #4f5b58;

  font-family: monospace;

  font-size: 9px;

  line-height: 1.6;
}

.memory-item {
  margin-bottom: 8px;

  padding: 11px;

  border: 1px solid #16201e;

  background: #080b0b;
}

.memory-time {
  color: #4b5b57;

  font-family: monospace;

  font-size: 7px;
}

.memory-role {
  margin: 5px 0;

  color: #00ffb8;

  font-family: monospace;

  font-size: 8px;
}

.memory-text {
  color: #84908d;

  font-family: monospace;

  font-size: 9px;

  line-height: 1.45;

  display: -webkit-box;

  -webkit-line-clamp: 4;

  -webkit-box-orient: vertical;

  overflow: hidden;
}

.memory-footer {
  padding: 13px 16px;

  display: flex;

  justify-content: space-between;

  border-top: 1px solid #17201f;

  color: #4f5c58;

  font-family: monospace;

  font-size: 7px;

  letter-spacing: .1em;
}


/* MOBILE */

@media (max-width: 1100px) {

  .entity-layout {
    grid-template-columns:
      220px
      minmax(0, 1fr);
  }

  .memory-sidebar {
    display: none;
  }

}

@media (max-width: 760px) {

  .entity-nav {
    grid-template-columns: 1fr auto;
  }

  .entity-nav-center {
    display: none;
  }

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

  .entity-sidebar {
    display: none;
  }

  .chat-messages {
    height: calc(100vh - 280px);
  }

  .entity-back {
    font-size: 7px;
  }

}
