html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: #fff;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Amazon Ember', sans-serif;
  font-size: 14px;
}

.beacon-app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  background: #fff;
  overflow: hidden;
}

.beacon-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: linear-gradient(135deg, #f9a825 0%, #f57f17 100%);
  color: #3e2723;
  flex-shrink: 0;
}
.beacon-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 15px;
}
.beacon-header-left .beacon-icon {
  width: 22px;
  height: 22px;
}
.beacon-header-actions {
  display: flex;
  gap: 4px;
}
.beacon-header-btn {
  background: rgba(62, 39, 35, 0.1);
  border: none;
  color: #3e2723;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.beacon-header-btn:hover {
  background: rgba(62, 39, 35, 0.2);
}

.beacon-context {
  padding: 8px 16px;
  background: #fff8e1;
  color: #e65100;
  font-size: 12px;
  border-bottom: 1px solid #ffe082;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}
.beacon-context[hidden] {
  display: none;
}
.beacon-context-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #f9a825;
  flex-shrink: 0;
}

.beacon-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.beacon-msg {
  max-width: 88%;
  padding: 10px 14px;
  border-radius: 12px;
  line-height: 1.5;
  word-wrap: break-word;
}
.beacon-msg p {
  margin: 0 0 8px 0;
}
.beacon-msg p:last-child {
  margin-bottom: 0;
}
.beacon-msg ul,
.beacon-msg ol {
  margin: 4px 0;
  padding-left: 20px;
}
.beacon-msg li {
  margin: 2px 0;
}
.beacon-msg code {
  background: rgba(0, 0, 0, 0.06);
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 13px;
}
.beacon-msg pre.beacon-code-block {
  background: #1e1e1e;
  color: #d4d4d4;
  padding: 10px 12px;
  border-radius: 6px;
  overflow-x: auto;
  font-size: 12px;
  margin: 6px 0;
}
.beacon-msg pre.beacon-code-block code {
  background: none;
  padding: 0;
  color: inherit;
  font-size: inherit;
}
.beacon-msg h2,
.beacon-msg h3,
.beacon-msg h4 {
  margin: 8px 0 4px 0;
  font-size: 14px;
  font-weight: 600;
}
.beacon-msg h2 {
  font-size: 15px;
}
.beacon-msg a {
  color: #1a73e8;
  text-decoration: none;
}
.beacon-msg a:hover {
  text-decoration: underline;
}
.beacon-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  margin: 6px 0;
}
.beacon-table th,
.beacon-table td {
  border: 1px solid #dadce0;
  padding: 4px 8px;
  text-align: left;
}
.beacon-table th {
  background: #f1f3f4;
  font-weight: 600;
}
.beacon-warning {
  background: #fff8e1;
  border-left: 3px solid #f9a825;
  padding: 6px 10px;
  margin: 6px 0;
  border-radius: 0 4px 4px 0;
  font-size: 13px;
}
.beacon-msg.user {
  align-self: flex-end;
  background: #f9a825;
  color: #3e2723;
  border-bottom-right-radius: 4px;
}
.beacon-msg.assistant {
  align-self: flex-start;
  background: #f1f3f4;
  color: #202124;
  border-bottom-left-radius: 4px;
}
.beacon-msg.system {
  align-self: center;
  background: transparent;
  color: #80868b;
  font-size: 12px;
  padding: 4px 8px;
}

.beacon-msg.beacon-signin {
  align-self: center;
  text-align: center;
  font-size: 14px;
  color: #3c4043;
}
.beacon-signin-btn {
  margin-top: 8px;
  padding: 8px 18px;
  border: none;
  border-radius: 6px;
  background: linear-gradient(135deg, #f9a825 0%, #f57f17 100%);
  color: white;
  font-size: 14px;
  cursor: pointer;
}
.beacon-signin-btn:hover {
  filter: brightness(1.05);
}
.beacon-signin-btn:disabled {
  opacity: 0.6;
  cursor: default;
}

.beacon-typing {
  display: none;
  align-self: flex-start;
  padding: 10px 14px;
  background: #f1f3f4;
  border-radius: 12px;
  border-bottom-left-radius: 4px;
}
.beacon-typing.visible {
  display: flex;
  gap: 4px;
}
.beacon-typing-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #80868b;
  animation: beacon-bounce 1.2s infinite;
}
.beacon-typing-dot:nth-child(2) {
  animation-delay: 0.2s;
}
.beacon-typing-dot:nth-child(3) {
  animation-delay: 0.4s;
}
@keyframes beacon-bounce {
  0%,
  60%,
  100% {
    transform: translateY(0);
  }
  30% {
    transform: translateY(-4px);
  }
}

.beacon-footer {
  padding: 12px 16px;
  border-top: 1px solid #e8eaed;
  flex-shrink: 0;
}
.beacon-input-row {
  display: flex;
  gap: 8px;
}
.beacon-input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid #dadce0;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
  resize: none;
  min-height: 20px;
  max-height: 120px;
  overflow-y: auto;
  line-height: 1.4;
}
.beacon-input:focus {
  border-color: #f9a825;
}
.beacon-input:disabled {
  background: #f8f9fa;
  color: #80868b;
}
.beacon-send-btn {
  padding: 10px 18px;
  background: #f9a825;
  color: #3e2723;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}
.beacon-send-btn:hover {
  background: #f57f17;
}
.beacon-send-btn:disabled {
  background: #dadce0;
  color: #80868b;
  cursor: default;
}

.beacon-welcome {
  text-align: center;
  padding: 24px 16px;
  color: #5f6368;
}
.beacon-welcome-icon {
  font-size: 40px;
  margin-bottom: 12px;
}
.beacon-welcome-title {
  font-size: 16px;
  font-weight: 600;
  color: #202124;
  margin-bottom: 6px;
}
.beacon-welcome-sub {
  font-size: 13px;
  line-height: 1.5;
}
