@font-face{
  font-family: "Sansation";
  src: local("Sansation");
  font-display: swap;
}

:root{
  --bg:#0b1220;
  --panel:#121b2f;
  --card:#0f172a;
  --text:#e8eefc;
  --muted:#a9b7d6;
  --line:rgba(255,255,255,0.12);
  --brand:#0088ce;
  --brand2:#c3dcf8;
  --danger:#ef4444;
  --ok:#22c55e;
  --warn:#f59e0b;
  --shadow: 0 10px 30px rgba(0,0,0,0.35);
  --radius:16px;
}

*{ box-sizing:border-box; }
html, body{ height:100%; }

body{
  margin:0;
  font-family: "Sansation", ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Liberation Sans", sans-serif;
  background:
    radial-gradient(1200px 800px at 20% 0%, rgba(0,136,206,0.25), transparent 60%),
    radial-gradient(1000px 700px at 90% 10%, rgba(195,220,248,0.18), transparent 60%),
    var(--bg);
  color:var(--text);
}

.wrap{
  max-width: 980px;
  margin: 0 auto;
  padding: 18px 18px 40px 18px;
}

.stickyBar{
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
  background: rgba(11,18,32,0.75);
  border-bottom: 1px solid var(--line);
}

.stickyInner{
  max-width: 980px;
  margin: 0 auto;
  padding: 14px 18px;
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 14px;
  align-items: center;
}

.titleRow{
  display:flex;
  align-items:center;
  gap: 12px;
}

.logo{
  display:flex;
  align-items:center;
  gap: 50px;
}

.logo img{
  height: 30px;
  width: auto;
  display:block;
  opacity: 0.95;
}

.badge{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(18,27,47,0.65);
  box-shadow: var(--shadow);
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}

.dot{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #64748b;
}
.dot.ok{ background: var(--ok); }
.dot.paused{ background: var(--warn); }
.dot.danger{ background: var(--danger); }

.helper{
  margin-top: 6px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.35;
}

.controls{
  display:flex;
  gap: 10px;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
}

.btn{
  appearance:none;
  border: 1px solid var(--line);
  background: rgba(18,27,47,0.8);
  color: var(--text);
  padding: 10px 14px;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: var(--shadow);
  font-weight: 600;
}
.btn:disabled{
  opacity: 0.45;
  cursor: not-allowed;
}

.btnPrimary{
  border-color: rgba(0,136,206,0.6);
  background: linear-gradient(180deg, rgba(0,136,206,0.95), rgba(0,136,206,0.65));
}

.btnDanger{
  border-color: rgba(239,68,68,0.65);
  background: linear-gradient(180deg, rgba(239,68,68,0.95), rgba(239,68,68,0.65));
}

.timerPill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width: 92px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(18,27,47,0.65);
  box-shadow: var(--shadow);
  font-weight: 700;
  letter-spacing: 0.5px;
}

.grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 18px;
}

.card{
  background: rgba(15,23,42,0.7);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
}

.card h2{
  margin:0 0 10px 0;
  font-size: 15px;
  color: var(--brand2);
}

.row{
  display:grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-bottom: 10px;
}

label{
  font-size: 13px;
  color: var(--muted);
}

input{
  width: 100%;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(18,27,47,0.65);
  color: var(--text);
  outline: none;
  font-family: inherit;
}

input:focus{
  border-color: rgba(0,136,206,0.75);
  box-shadow: 0 0 0 4px rgba(0,136,206,0.15);
}

.hint{
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
}

.steps{
  margin: 10px 0 0 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.footerNote{
  margin: 10px 0 0 0;
  font-size: 12px;
  color: var(--muted);
}

.logWrap{
  margin-top: 18px;
}

.logBox{
  margin: 0;
  padding: 14px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(18,27,47,0.55);
  overflow: auto;
  box-shadow: var(--shadow);
  font-size: 13px;
  line-height: 1.5;
  height: 300px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bubble{
  padding: 10px 12px;
  border-radius: 14px;
  max-width: 92%;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.bubbleHeader{
  font-size: 11px;
  font-weight: 700;
  opacity: 0.85;
  margin-bottom: 4px;
}

.bubbleBody{
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.bubble.assistant{
  align-self: flex-start;
  background: rgba(0,136,206,0.55);
  border: 1px solid rgba(0,136,206,0.85);
  color: #ffffff;
}

.bubble.user{
  align-self: flex-end;
  background: rgba(195,220,248,0.22);
  border: 1px solid rgba(195,220,248,0.55);
  color: var(--text);
}

.bubble.system{
  align-self: center;
  background: rgba(239,68,68,0.12);
  border: 1px solid rgba(239,68,68,0.35);
  width: 100%;
  max-width: 100%;
}
