:root {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.4;
}

body {
  margin: 0;
  background: #0b0f17;
  color: #e9eef7;
}

.container {
  max-width: 980px;
  margin: 0 auto;
  padding: 28px 16px 48px;
  position: relative;
}

h1 { margin: 0 0 10px; font-size: 28px; }
h2 { margin: 0 0 10px; font-size: 18px; }
.subtle { margin: 0 0 16px; color: #b9c4d8; }

.card {
  background: #111827;
  border: 1px solid #243047;
  border-radius: 14px;
  padding: 16px;
  margin: 14px 0;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
}

label {
  display: block;
  margin: 10px 0 6px;
  font-weight: 600;
}

textarea, select {
  width: 100%;
  background: #0b1220;
  color: #e9eef7;
  border: 1px solid #243047;
  border-radius: 10px;
  padding: 10px;
  font-size: 14px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 10px;
}

.row { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }

button {
  background: #2563eb;
  color: white;
  border: 0;
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
}

button.secondary { background: #334155; }

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

.status, .response {
  background: #0b1220;
  border: 1px solid #243047;
  border-radius: 10px;
  padding: 10px;
  overflow: auto;
}

input {
  width: 100%;
  background: #0b1220;
  color: #e9eef7;
  border: 1px solid #243047;
  border-radius: 10px;
  padding: 10px;
  font-size: 14px;
}

hr.divider {
  border: 0;
  border-top: 1px solid #243047;
  margin: 16px 0;
}


/* PowerPrompts additions */
.hidden { display: none !important; }

.header {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
}

.authBox { min-width: 260px; }
.authDetails { margin-top: 10px; }
.authGrid { grid-template-columns: 1fr 1fr; }
.userLabel { font-weight: 600; margin: 2px 0 6px 0; }

.rowBetween { justify-content: space-between; align-items: center; }
.linkLike { cursor: pointer; text-decoration: underline; }

.historyList { display: flex; flex-direction: column; gap: 10px; }
.historyItem {
  border: 1px solid #243047;
  border-radius: 12px;
  padding: 12px;
  background: rgba(255,255,255,0.02);
  transition: all 0.2s ease;
}

.historyItem:hover {
  background: rgba(255,255,255,0.05);
  border-color: #334566;
}

.historyTop { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.badge {
  display: inline-block;
  border: 1px solid #243047;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 12px;
  color: #c9d3e6;
}

.dialog::backdrop { background: rgba(0,0,0,0.6); }
.dialogInner { width: min(720px, 92vw); }
.tiny { font-size: 12px; }
.bullets { margin: 8px 0 0 18px; }

/* Deployment mode grid */
.deployment-mode-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.mode-option {
  position: relative;
  cursor: pointer;
  border: 2px solid #243047;
  border-radius: 12px;
  padding: 20px 16px;
  background: rgba(255,255,255,0.02);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.mode-option:hover {
  background: rgba(255,255,255,0.05);
  border-color: #334566;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.mode-option input[type="radio"] {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 20px;
  height: 20px;
  cursor: pointer;
}

.mode-option input[type="radio"]:checked ~ .mode-content {
  opacity: 1;
}

.mode-option:has(input:checked) {
  background: rgba(37, 99, 235, 0.15);
  border-color: #2563eb;
  box-shadow: 0 0 0 1px #2563eb, 0 4px 12px rgba(37, 99, 235, 0.3);
}

.mode-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
  opacity: 0.8;
  transition: opacity 0.2s;
  pointer-events: none;
}

.mode-icon {
  font-size: 32px;
  line-height: 1;
  margin-bottom: 4px;
}

.mode-label {
  font-size: 16px;
  font-weight: 700;
  color: #e9eef7;
}

.mode-description {
  font-size: 12px;
  color: #b9c4d8;
  line-height: 1.4;
}

/* History item radio buttons */
.historyItem input[type="radio"] {
  width: auto;
  margin: 0;
  cursor: pointer;
  flex-shrink: 0;
}

/* Selected history item highlighting */
.historyItem.selected {
  background: rgba(37, 99, 235, 0.15);
  border-color: #2563eb;
  box-shadow: 0 0 0 1px #2563eb;
}

/* Limit height and make "Select baseline from history" scrollable */
#inlineHistoryList {
  max-height: 400px;
  overflow-y: auto;
  overflow-x: hidden;
}

/* Template gallery */
#templateGallery {
  max-height: 400px;
  overflow-y: auto;
  overflow-x: hidden;
}

/* Modal styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-content {
  background: #111827;
  border: 1px solid #243047;
  border-radius: 14px;
  padding: 24px;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.modal h3 {
  margin-top: 0;
}

/* All history list in admin panel */
#allHistoryList {
  max-height: 600px;
  overflow-y: auto;
}

/* Users list in admin panel */
#usersList {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.userItem {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  border: 1px solid #243047;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
}

.userItem:hover {
  background: rgba(255, 255, 255, 0.05);
}

.userEmail {
  flex: 1;
  font-weight: 500;
}

.adminBadge {
  display: inline-block;
  background: #2563eb;
  color: white;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  margin-left: 8px;
}

/* Template item styling */
.templateItem {
  border: 2px dashed #2563eb;
  background: rgba(37, 99, 235, 0.08);
}

.templateItem:hover {
  background: rgba(37, 99, 235, 0.15);
  border-color: #3b82f6;
}

.templateItem.selectedTemplate {
  border: 2px solid #16a34a;
  background: rgba(22, 163, 74, 0.15);
  box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.3);
}

/* Language switcher styling */
.language-switcher-container {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 100;
}

.language-select {
  background: #0b1220;
  color: #e9eef7;
  border: 1px solid #243047;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 14px;
  cursor: pointer;
  transition: border-color 0.2s ease;
  min-width: 120px;
}

.language-select:hover {
  border-color: #2563eb;
}

.language-select:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}
