/* ==========================================================================
   Renaissance AI — Beta App Console
   ========================================================================== */

.app-page{ background: var(--bg); }

.btn[disabled]{ opacity:.55; cursor:not-allowed; pointer-events:none; }

.tag{
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid var(--line-bright);
  color: var(--ink-faint);
  white-space: nowrap;
}
.tag--live{ color: var(--cyan); border-color: rgba(79,216,255,.4); background: rgba(79,216,255,.08); }

/* ================= Topbar ================= */
.app-topbar{
  position: fixed;
  top:0; left:0; right:0;
  z-index: 500;
  padding: 14px 0;
  background: rgba(5,7,13,.85);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.app-topbar__inner{ display:flex; align-items:center; gap: 16px; }
.app-topbar .brand__logo{ width:36px; height:36px; }

.beta-pill{
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .1em;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line-bright);
  color: var(--gold-bright);
  background: rgba(212,162,78,.1);
}

.app-topbar__spacer{ flex:1; }

.net-chip{
  display:inline-flex; align-items:center; gap:8px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--ink-dim);
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
}
.net-chip__dot{
  width:7px; height:7px; border-radius:50%;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
  animation: dotPulse 2s ease-in-out infinite;
}
@keyframes dotPulse{ 0%,100%{ opacity:1; } 50%{ opacity:.35; } }

.wallet{ position: relative; }
.wallet__menu{
  position:absolute; top: calc(100% + 12px); right:0;
  width: 250px;
  background: var(--bg-elevated);
  border: 1px solid var(--line-bright);
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 24px 60px -20px rgba(0,0,0,.75);
  z-index: 50;
  animation: viewFade .25s var(--ease);
}
.wallet__label{ font-size:11.5px; text-transform:uppercase; letter-spacing:.06em; color: var(--ink-faint); margin: 0 0 12px; }
.wallet__option{
  width:100%; display:flex; align-items:center; gap:10px;
  padding: 11px 13px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.02);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 14px; font-weight: 500;
  margin-bottom: 8px;
  cursor: pointer;
  transition: border-color .25s var(--ease), background .25s var(--ease);
}
.wallet__option:last-of-type{ margin-bottom: 10px; }
.wallet__option:hover{ border-color: var(--gold); background: rgba(212,162,78,.06); }
.wallet__dot{ width:16px; height:16px; border-radius:5px; display:inline-block; flex:none; }
.wallet__note{ font-size: 11px; line-height:1.55; color: var(--ink-faint); margin:0; }

.wallet__connected{
  display:flex; align-items:center; gap:8px;
  padding: 9px 15px;
  border: 1px solid var(--line-bright);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--gold-bright);
  background: rgba(212,162,78,.08);
  cursor: pointer;
}
.wallet__connected .wallet__dot{ width:8px; height:8px; border-radius:50%; background:#3ddc84; box-shadow:0 0 6px #3ddc84; }

.app-topbar__home{
  display:flex; align-items:center; gap:7px;
  font-size: 13.5px;
  color: var(--ink-dim);
  padding: 6px 2px;
  transition: color .25s var(--ease);
}
.app-topbar__home svg{ width:16px; height:16px; }
.app-topbar__home:hover{ color: var(--gold-bright); }

/* ================= Beta banner ================= */
.beta-banner{
  margin-top: 64px;
  background: linear-gradient(90deg, rgba(212,162,78,.12), rgba(79,216,255,.07));
  border-bottom: 1px solid var(--line);
}
.beta-banner__inner{
  display:flex; align-items:center; gap: 12px;
  padding: 12px 28px;
}
.beta-banner svg{ width:19px; height:19px; color: var(--gold-bright); flex:none; }
.beta-banner p{ margin:0; flex:1; font-size: 13.5px; color: var(--ink-dim); }
.beta-banner strong{ color: var(--ink); }
.beta-banner button{
  background:none; border:none; color: var(--ink-faint);
  font-size: 22px; line-height:1; cursor:pointer; padding: 0 4px;
  transition: color .25s var(--ease);
}
.beta-banner button:hover{ color: var(--ink); }
.beta-banner.is-hidden{ display:none; }

/* ================= View tabs ================= */
.app-tabs{
  position: sticky;
  top: 64px;
  z-index: 300;
  background: rgba(5,7,13,.82);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.app-tabs__inner{
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 28px;
  display:flex;
  gap: 4px;
  overflow-x:auto;
  scrollbar-width: none;
}
.app-tabs__inner::-webkit-scrollbar{ display:none; }

.app-tabs__link{
  display:flex; align-items:center; gap:8px;
  flex: none;
  padding: 15px 16px;
  background:none; border:none;
  border-bottom: 2px solid transparent;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: .02em;
  color: var(--ink-faint);
  cursor: pointer;
  white-space: nowrap;
  transition: color .3s var(--ease), border-color .3s var(--ease);
}
.app-tabs__link svg{ width:16px; height:16px; }
.app-tabs__link:hover{ color: var(--ink); }
.app-tabs__link.is-active{ color: var(--gold-bright); border-color: var(--gold); }

/* ================= Main / views ================= */
.app-main{ padding: 44px 0 100px; min-height: 60vh; }

.app-view{ display:none; }
.app-view.is-active{ display:block; animation: viewFade .5s var(--ease); }
@keyframes viewFade{ from{ opacity:0; transform: translateY(10px); } to{ opacity:1; transform:none; } }

.view-head{ margin-bottom: 36px; }
.view-head__sub{ max-width: 620px; color: var(--ink-dim); font-size: 15.5px; margin:0; }

/* Stat grid ------------------------------------------------ */
.stat-grid{
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 36px;
}
.stat-card{
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,0));
  display:flex; flex-direction:column; gap: 9px;
}
.stat-card__label{ font-family: var(--font-mono); font-size: 11.5px; text-transform:uppercase; letter-spacing:.06em; color: var(--ink-faint); }
.stat-card__value{ font-family: var(--font-display); font-size: 32px; font-weight:700; color: var(--ink); line-height:1; }
.stat-card__value--muted{ color: var(--ink-dim); font-size: 23px; }
.stat-card__of{ font-size:16px; color: var(--ink-faint); font-weight:500; }
.stat-card__hint{ font-size: 12px; color: var(--ink-faint); }

/* Panels ------------------------------------------------ */
.split-grid{ display:grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items:start; }
.panel{
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 26px;
  background: linear-gradient(180deg, rgba(255,255,255,.025), rgba(255,255,255,0));
}
.panel__head{ display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom: 20px; }
.panel__head h3{ font-family: var(--font-display); font-size:18px; margin:0; color: var(--ink); font-weight:600; }
.panel__desc{ font-size: 14.5px; color: var(--ink-dim); margin: 0 0 18px; }

/* Overview: agent status + activity ------------------------------------------------ */
.agent-status-list{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:18px; }
.agent-status-list li{ display:flex; align-items:center; gap:12px; }
.agent-status-list .dot{ width:9px; height:9px; border-radius:50%; background:#3ddc84; box-shadow:0 0 8px #3ddc84; flex:none; }
.agent-status-list .name{ font-weight:600; font-size:14.5px; color: var(--ink); }
.agent-status-list .action{ font-size:12.5px; color: var(--ink-faint); margin-left:auto; text-align:right; max-width: 55%; }

.activity-feed{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:14px; max-height:270px; overflow-y:auto; }
.activity-feed li{ display:flex; gap:12px; font-size:13.5px; color: var(--ink-dim); border-left:2px solid var(--line-bright); padding-left:12px; }
.activity-feed time{ flex:none; font-family: var(--font-mono); font-size:11px; color: var(--ink-faint); padding-top:1px; }
.activity-feed li.is-new{ animation: feedIn .5s var(--ease); }
@keyframes feedIn{ from{ opacity:0; transform: translateX(-6px); } to{ opacity:1; transform:none; } }

/* Agents grid ------------------------------------------------ */
.agents-grid{ display:grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.agent-card{
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px;
  background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,0));
  transition: border-color .35s var(--ease), transform .35s var(--ease);
}
.agent-card:hover{ border-color: var(--line-bright); transform: translateY(-4px); }
.agent-card__top{ display:flex; align-items:flex-start; justify-content:space-between; gap:12px; margin-bottom: 16px; }
.agent-card__icon{
  width:52px; height:52px; border-radius:14px;
  display:flex; align-items:center; justify-content:center;
  background: rgba(212,162,78,.08);
  border: 1px solid var(--line-bright);
  color: var(--gold-bright);
  flex: none;
}
.agent-card__icon svg{ width:26px; height:26px; }
.agent-card__status{ display:flex; align-items:center; gap:6px; font-family: var(--font-mono); font-size:11px; color:#3ddc84; padding-top:6px; }
.agent-card__status .dot{ width:7px; height:7px; border-radius:50%; background:#3ddc84; box-shadow:0 0 6px #3ddc84; }
.agent-card h3{ font-family: var(--font-display); font-size:19px; margin:0 0 4px; color: var(--ink); }
.agent-card__role{ font-family: var(--font-mono); font-size:11px; letter-spacing:.05em; text-transform:uppercase; color: var(--cyan); margin-bottom:12px; display:block; }
.agent-card p{ font-size:14.5px; color: var(--ink-dim); margin:0 0 16px; }
.agent-card__stat{ font-size:12.5px; color: var(--ink-faint); margin-bottom:16px; }
.agent-card__logs{
  display:none; list-style:none; margin:0 0 14px; padding:12px 14px;
  border:1px solid var(--line); border-radius:10px; background: rgba(0,0,0,.2);
  font-size:12.5px; color: var(--ink-dim); flex-direction:column; gap:8px;
}
.agent-card__logs.is-open{ display:flex; }
.agent-card__toggle{
  font-size:13px; font-weight:600; color: var(--gold-bright);
  background:none; border:none; cursor:pointer; padding:0;
  display:inline-flex; align-items:center; gap:6px;
}
.agent-card__toggle svg{ width:13px; height:13px; transition: transform .3s var(--ease); }
.agent-card__toggle.is-open svg{ transform: rotate(180deg); }

/* Creative engine ------------------------------------------------ */
.field-label{ display:block; font-family: var(--font-mono); font-size:11.5px; text-transform:uppercase; letter-spacing:.05em; color: var(--ink-faint); margin: 20px 0 10px; }
.field-label:first-of-type{ margin-top:0; }
.field-label span{ text-transform:none; letter-spacing:0; opacity:.75; }

.chip-select{ display:flex; flex-wrap:wrap; gap:8px; }
.chip{
  padding: 9px 16px; border-radius:999px;
  border:1px solid var(--line-bright);
  background: rgba(255,255,255,.02);
  color: var(--ink-dim);
  font-family: var(--font-body);
  font-size:13.5px; font-weight:500;
  cursor:pointer;
  transition: all .25s var(--ease);
}
.chip:hover{ color: var(--ink); border-color: var(--gold); }
.chip.is-active{ background: linear-gradient(135deg, var(--gold-bright), var(--gold)); color:#1a1204; border-color: transparent; }

.text-input{
  width:100%;
  padding: 13px 16px;
  border-radius:12px;
  border:1px solid var(--line-bright);
  background: rgba(255,255,255,.03);
  color: var(--ink);
  font-family: var(--font-body);
  font-size:14.5px;
}
.text-input:focus{ outline:none; border-color: var(--gold); }
.text-input::placeholder{ color: var(--ink-faint); }

.ace-output{
  margin-top: 22px;
  padding: 20px;
  border-radius:14px;
  border:1px solid var(--line-bright);
  background: rgba(79,216,255,.04);
  animation: viewFade .4s var(--ease);
}
.ace-output__head{ display:flex; align-items:center; justify-content:space-between; margin-bottom:12px; }
.ace-output p{ margin:0; font-size:15.5px; line-height:1.7; color: var(--ink); }

.icon-btn{
  width:30px; height:30px;
  display:flex; align-items:center; justify-content:center;
  border-radius:8px; border:1px solid var(--line-bright);
  background:none; color: var(--ink-faint);
  cursor:pointer;
  transition: color .25s var(--ease), border-color .25s var(--ease);
}
.icon-btn svg{ width:14px; height:14px; }
.icon-btn:hover{ color: var(--gold-bright); border-color: var(--gold); }
.icon-btn.is-copied{ color: var(--cyan); border-color: var(--cyan-dim); }

.history-list{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:14px; max-height:430px; overflow-y:auto; }
.history-list__empty{ font-size:14px; color: var(--ink-faint); font-style:italic; }
.history-list li{ padding: 14px 16px; border:1px solid var(--line); border-radius:12px; font-size:13.5px; color: var(--ink-dim); animation: feedIn .4s var(--ease); }
.history-list .history-meta{ display:flex; justify-content:space-between; margin-bottom:6px; font-family: var(--font-mono); font-size:11px; color: var(--ink-faint); }

/* Execution ------------------------------------------------ */
.empty-state{ display:flex; flex-direction:column; align-items:center; text-align:center; gap:12px; padding: 26px 10px; color: var(--ink-faint); }
.empty-state svg{ width:44px; height:44px; opacity:.5; }
.empty-state p{ margin:0; font-size:13.5px; max-width:260px; }

.chain-list{ margin-top:22px; display:flex; flex-direction:column; gap:10px; }
.chain-row{ display:flex; justify-content:space-between; align-items:center; padding:12px 14px; border:1px solid var(--line); border-radius:10px; font-size:14px; color: var(--ink); }

.audit-checklist{ list-style:none; margin:20px 0 0; padding:0; display:flex; flex-direction:column; gap:12px; }
.audit-checklist li{
  display:flex; align-items:center; gap:10px;
  font-size:13.5px; color: var(--ink-faint);
  opacity:0; transform: translateY(6px);
  transition: opacity .4s var(--ease), transform .4s var(--ease), color .4s var(--ease);
}
.audit-checklist li.is-visible{ opacity:1; transform:none; }
.audit-checklist li.is-done{ color: var(--ink); }
.audit-checklist .check{ width:20px; height:20px; border-radius:50%; border:1.5px solid var(--line-bright); flex:none; display:flex; align-items:center; justify-content:center; transition: background .3s var(--ease), border-color .3s var(--ease); }
.audit-checklist li.is-done .check{ background:#3ddc84; border-color:#3ddc84; }
.audit-checklist .check svg{ width:11px; height:11px; opacity:0; transition: opacity .2s var(--ease); color:#06210f; }
.audit-checklist li.is-done .check svg{ opacity:1; }
.audit-checklist li.is-final{ font-weight:600; color: var(--gold-bright); margin-top:6px; }

/* Governance ------------------------------------------------ */
.proposals{ display:flex; flex-direction:column; gap:20px; }
.proposal{ border:1px solid var(--line); border-radius:16px; padding: 26px; }
.proposal__head{ display:flex; justify-content:space-between; gap:12px; align-items:flex-start; margin-bottom:6px; flex-wrap:wrap; }
.proposal h3{ font-family: var(--font-display); font-size:18px; margin:0 0 8px; color: var(--ink); }
.proposal p{ font-size:14.5px; color: var(--ink-dim); margin: 0 0 20px; }
.proposal__bar{ height:8px; border-radius:999px; background: rgba(255,255,255,.06); overflow:hidden; margin-bottom:10px; display:flex; }
.proposal__bar span{ display:block; height:100%; transition: width .5s var(--ease); }
.proposal__bar .for{ background: linear-gradient(90deg, var(--gold), var(--gold-bright)); }
.proposal__bar .against{ background: rgba(255,255,255,.18); }
.proposal__stats{ display:flex; justify-content:space-between; font-size:12px; color: var(--ink-faint); margin-bottom:18px; font-family: var(--font-mono); }
.proposal__actions{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.vote-btn{
  padding: 9px 18px; border-radius:999px;
  border:1px solid var(--line-bright);
  background:none; color: var(--ink-dim);
  font-family: var(--font-body);
  font-size:13.5px; font-weight:600;
  cursor:pointer;
  transition: all .25s var(--ease);
}
.vote-btn:hover{ border-color: var(--gold); color: var(--ink); }
.vote-btn.is-voted{ background: rgba(212,162,78,.14); border-color: var(--gold); color: var(--gold-bright); }
.proposal__voted-note{ font-size:12.5px; color: var(--cyan); margin-left:auto; }

/* Footer ------------------------------------------------ */
.app-footer{ border-top:1px solid var(--line); padding: 26px 0; }
.app-footer__inner{ display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:14px; font-size:12.5px; color: var(--ink-faint); }
.app-footer__links{ display:flex; gap:20px; }
.app-footer__links a{ color: var(--ink-faint); transition: color .25s var(--ease); }
.app-footer__links a:hover{ color: var(--gold-bright); }

/* Toast ------------------------------------------------ */
.toast{
  position: fixed; bottom: 26px; left:50%;
  transform: translate(-50%, 20px);
  background: var(--bg-elevated);
  border:1px solid var(--line-bright);
  color: var(--ink);
  padding: 13px 24px;
  border-radius:999px;
  font-size:13.5px;
  opacity:0;
  pointer-events:none;
  transition: opacity .35s var(--ease), transform .35s var(--ease);
  z-index: 900;
  box-shadow: 0 20px 50px -20px rgba(0,0,0,.75);
  max-width: 90vw;
  text-align:center;
}
.toast.is-visible{ opacity:1; transform: translate(-50%, 0); }

/* ================= Responsive ================= */
@media (max-width: 960px){
  .stat-grid{ grid-template-columns: repeat(2, 1fr); }
  .split-grid{ grid-template-columns: 1fr; }
  .agents-grid{ grid-template-columns: 1fr; }
}

@media (max-width: 640px){
  .app-topbar{ padding: 10px 0; }
  .app-topbar__inner{ gap:8px; }
  .app-topbar .brand__logo{ width:28px; height:28px; }
  .app-topbar .brand__name{ font-size: 14.5px; }
  .beta-pill{ font-size:9px; padding:3px 7px; letter-spacing:.06em; }
  .net-chip{ display:none; }
  .app-topbar__home{ display:none; }
  .wallet__connected{ font-size:11.5px; padding:7px 10px; }
  .app-topbar .btn--sm{ padding:8px 14px; font-size:12.5px; }
  .beta-banner__inner{ padding: 12px 20px; }
  .beta-banner p{ font-size:12.5px; }
  .stat-grid{ grid-template-columns: 1fr; }
  .app-main{ padding: 34px 0 80px; }
}

@media (max-width: 360px){
  .app-topbar .brand__name{ display:none; }
}
