/* ------------------------------------------------------------
   GLOBAL LAYOUT (your existing CSS)
------------------------------------------------------------ */

body {
  font-family: sans-serif;
  margin: 0;
  padding: 20px;
  background: #f5f5f5;
}

#app {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}


/* ------------------------------------------------------------
   SYSTEM UI PANELS (your existing CSS)
------------------------------------------------------------ */

#input-panel,
#workflow-panel,
#carrier-panel,
#output-panel {
  background: white;
  padding: 15px;
  border-radius: 6px;
  box-shadow: 0 0 4px rgba(0,0,0,0.1);
}

/* System chat window inside output-panel */
#output-panel {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  gap: 10px;
  height: 400px;
  padding-left: 20px;
  padding-right: 20px;
}

/* System input polish */
#input-text {
  width: 100%;
  padding: 8px;
  resize: none;
  font-size: 14px;
  margin-bottom: 6px;
}

#input-submit {
  padding: 6px 12px;
  font-size: 14px;
  cursor: pointer;
}


/* ------------------------------------------------------------
   SURFACES UI LAYOUT (new)
------------------------------------------------------------ */

#surfaces-ui {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px;
  border-bottom: 1px solid #ddd;
  background: #fafafa;
}


/* ------------------------------------------------------------
   SURFACES CHAT WINDOW (new)
------------------------------------------------------------ */

.chat-window {
  height: 260px;
  overflow-y: auto;
  padding: 12px;
  background: #ffffff;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-family: sans-serif;
  font-size: 14px;
  line-height: 1.4;
}


/* ------------------------------------------------------------
   SURFACES CHAT BUBBLES (new)
------------------------------------------------------------ */

.chat-bubble {
  max-width: 80%;
  padding: 8px 12px;
  margin-bottom: 10px;
  border-radius: 6px;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.bubble-user {
  background: #d9eaff;
  align-self: flex-end;
  margin-left: auto;
}

.bubble-system {
  background: #f1f1f1;
  align-self: flex-start;
  margin-right: auto;
}


/* ------------------------------------------------------------
   SURFACES INPUT BAR (new)
------------------------------------------------------------ */

.chat-input-bar {
  display: flex;
  gap: 8px;
}

.chat-input {
  flex: 1;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
}

.chat-send {
  padding: 8px 14px;
  background: #0078d4;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.chat-send:hover {
  background: #005fa3;
}


/* ------------------------------------------------------------
   SURFACES MENU BAR (new)
------------------------------------------------------------ */

.menu-bar {
  display: flex;
  gap: 8px;
}

.menu-btn {
  padding: 6px 12px;
  border: 1px solid #ccc;
  background: #f7f7f7;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
}

.menu-btn:hover {
  background: #eee;
}
