:root {
  color-scheme: light;
  --border: #d8dbe0;
  --bg: #f7f8fa;
  --user-bubble: #2563eb;
  --user-text: #ffffff;
  --assistant-bubble: #ffffff;
  --assistant-text: #1a1a1a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: #1a1a1a;
  display: flex;
  justify-content: center;
  padding: 2rem 1rem;
}

main {
  width: 100%;
  max-width: 720px;
}

h1 {
  font-size: 1.4rem;
  margin-bottom: 0.25rem;
}

.subtitle {
  color: #555;
  margin-top: 0;
  margin-bottom: 1.5rem;
}

#error-banner {
  background: #fde8e8;
  color: #9b1c1c;
  border: 1px solid #f5b5b5;
  border-radius: 6px;
  padding: 0.6rem 0.9rem;
  margin-bottom: 1rem;
}

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem;
}

#login-view label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

#login-view input {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 1rem;
  margin-bottom: 0.75rem;
}

button {
  cursor: pointer;
  border: none;
  border-radius: 6px;
  padding: 0.6rem 1.1rem;
  font-size: 0.95rem;
  font-weight: 600;
  background: var(--user-bubble);
  color: white;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

#chat-view:not([hidden]) {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.resume-notice {
  align-self: center;
  font-size: 0.8rem;
  color: #555;
  background: #f0f2f5;
  border-radius: 999px;
  padding: 0.3rem 0.8rem;
  margin-bottom: 0.2rem;
}

.status-badge {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: #e5e7eb;
  color: #374151;
}

.status-badge.status-submitted {
  background: #dcfce7;
  color: #166534;
}

#transcript {
  min-height: 320px;
  max-height: 55vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.bubble {
  max-width: 80%;
  border-radius: 10px;
  padding: 0.55rem 0.8rem;
}

.bubble-meta {
  font-size: 0.7rem;
  opacity: 0.7;
  margin-bottom: 0.15rem;
}

.bubble-content {
  white-space: pre-wrap;
  line-height: 1.4;
}

.bubble-user {
  align-self: flex-end;
  background: var(--user-bubble);
  color: var(--user-text);
}

.bubble-assistant {
  align-self: flex-start;
  background: var(--assistant-bubble);
  color: var(--assistant-text);
  border: 1px solid var(--border);
}

.composer {
  display: flex;
  gap: 0.5rem;
}

.composer textarea {
  flex: 1;
  resize: vertical;
  min-height: 2.6rem;
  max-height: 8rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 1rem;
  font-family: inherit;
}

.actions {
  display: flex;
  justify-content: flex-end;
}

#submit-btn {
  background: #16a34a;
}
