* {
  box-sizing: border-box;
}

:root {
  --bg0: #03060b;
  --bg1: #06111e;
  --bg2: #0b1320;
  --text: #e9f2ff;
  --muted: #8fb7e2;
  --line: rgba(141, 190, 255, 0.16);
  --soft: rgba(255, 255, 255, 0.055);
  --blue: #8fd3ff;
  --green: #57ffb3;
  --amber: #ffcc5c;
  --red: #ff5c5c;
}

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background:
    radial-gradient(circle at 70% 20%, rgba(88, 166, 255, 0.18), transparent 35%),
    radial-gradient(circle at 20% 80%, rgba(87, 255, 179, 0.08), transparent 32%),
    linear-gradient(135deg, var(--bg1), var(--bg2) 45%, var(--bg0));
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.alpha-shell {
  height: 100vh;
  overflow: hidden;
  padding: 18px;
}

.alpha-header {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.kicker {
  color: #7da7d9;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1 {
  margin: 4px 0 0;
  font-size: 30px;
  letter-spacing: 0.08em;
}

.seal {
  border: 1px solid rgba(125, 167, 217, 0.4);
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(20, 45, 78, 0.45);
  color: #a9d3ff;
  font-size: 12px;
  letter-spacing: 0.12em;
  white-space: nowrap;
}

.alpha-grid {
  height: calc(100vh - 104px);
  display: grid;
  grid-template-columns: 300px minmax(420px, 1fr) 430px;
  gap: 14px;
  overflow: hidden;
}

.pane {
  min-height: 0;
  border: 1px solid var(--line);
  background: rgba(8, 18, 32, 0.72);
  backdrop-filter: blur(18px);
  border-radius: 18px;
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

.pane-title {
  flex-shrink: 0;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(141, 190, 255, 0.12);
  font-weight: 800;
  color: #d7ebff;
  letter-spacing: 0.04em;
}

/* LEFT VAULT */
.vault-pane {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.input {
  width: calc(100% - 28px);
  margin: 12px 14px 0;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(141, 190, 255, 0.18);
  background: rgba(0, 0, 0, 0.22);
  color: var(--text);
  outline: none;
}

.input:focus {
  border-color: rgba(143, 211, 255, 0.55);
  box-shadow: 0 0 0 3px rgba(143, 211, 255, 0.08);
}

.btn {
  margin: 12px 14px 0;
  padding: 11px 14px;
  border: 1px solid rgba(124, 194, 255, 0.35);
  background: linear-gradient(135deg, rgba(69, 137, 255, 0.4), rgba(71, 210, 255, 0.16));
  color: white;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 800;
}

.btn:hover {
  border-color: rgba(143, 211, 255, 0.65);
  transform: translateY(-1px);
}

.btn.ghost {
  background: rgba(255, 255, 255, 0.06);
}

.review-btn {
  margin: 0;
  background: linear-gradient(135deg, rgba(255, 204, 92, 0.28), rgba(88, 166, 255, 0.18));
}

.folder-list {
  margin: 18px 14px 10px;
  overflow-y: auto;
  min-height: 0;
}

.folder {
  width: 100%;
  display: block;
  padding: 10px 12px;
  border: none;
  border-radius: 10px;
  color: #aac8e8;
  margin-bottom: 6px;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.folder:hover {
  background: rgba(88, 166, 255, 0.12);
}

.folder.active {
  background: rgba(88, 166, 255, 0.18);
  color: white;
}

.drop-zone {
  flex-shrink: 0;
  margin: auto 14px 14px;
  padding: 22px;
  text-align: center;
  border: 1px dashed rgba(141, 190, 255, 0.3);
  border-radius: 14px;
  color: #7da7d9;
}

.drop-small {
  margin-top: 8px;
  font-size: 11px;
  color: #6f93bb;
}

.drop-zone.dragging {
  border-color: rgba(87, 255, 179, 0.75);
  background: rgba(87, 255, 179, 0.08);
  color: #baffdf;
}

/* CENTER CHAT - isolated from right panes */
.chat-pane {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  min-height: 0;
}

.chat-log {
  min-height: 0;
  overflow-y: auto;
  padding: 16px;
}

.msg {
  padding: 12px 14px;
  border-radius: 14px;
  margin-bottom: 12px;
  line-height: 1.45;
}

.msg.alpha {
  background: rgba(88, 166, 255, 0.13);
  border: 1px solid rgba(88, 166, 255, 0.2);
}

.msg.user {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.chat-actions {
  flex-shrink: 0;
  padding: 10px 12px;
  border-top: 1px solid rgba(141, 190, 255, 0.12);
  display: flex;
  justify-content: flex-end;
}

.chat-input-row {
  flex-shrink: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  padding: 12px;
  border-top: 1px solid rgba(141, 190, 255, 0.12);
}

.chat-input {
  width: 100%;
  margin: 0;
}

.chat-input-row .btn {
  margin: 0;
}

/* RIGHT COLUMN */
.right-column {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: 170px minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  overflow: hidden;
}

.face-pane {
  padding: 18px;
}

.alpha-face {
  display: flex;
  align-items: center;
  gap: 16px;
}

.orb {
  width: 82px;
  height: 82px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 28%, #ffffff, #9fd0ff 16%, #315d91 42%, #081222 72%);
  box-shadow: 0 0 40px rgba(97, 177, 255, 0.6);
}

.face-name {
  font-size: 22px;
  font-weight: 900;
}

.face-subtitle {
  color: var(--muted);
  margin-top: 4px;
}

.status-line {
  margin-top: 18px;
  color: #a9d3ff;
  font-size: 13px;
}

.watch-pane,
.prediction-pane {
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.cards {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 14px;
}

.card {
  padding: 12px;
  border: 1px solid rgba(141, 190, 255, 0.14);
  background: var(--soft);
  border-radius: 14px;
  margin-bottom: 10px;
}

.card.notice {
  border-color: rgba(141, 190, 255, 0.18);
}

.card.warning {
  border-color: rgba(255, 204, 92, 0.45);
  background: rgba(255, 204, 92, 0.055);
}

.card.critical {
  border-color: rgba(255, 92, 92, 0.55);
  background: rgba(255, 92, 92, 0.055);
}

.card-title {
  font-weight: 900;
  margin-bottom: 5px;
}

.card-meta {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 6px;
}

.card-body {
  color: #dbeeff;
  font-size: 13px;
  line-height: 1.45;
}

.empty {
  padding: 14px;
  border: 1px dashed rgba(141, 190, 255, 0.18);
  border-radius: 14px;
  color: #7da7d9;
  font-size: 13px;
}

/* Scrollbar polish */
.chat-log::-webkit-scrollbar,
.cards::-webkit-scrollbar,
.folder-list::-webkit-scrollbar {
  width: 8px;
}

.chat-log::-webkit-scrollbar-thumb,
.cards::-webkit-scrollbar-thumb,
.folder-list::-webkit-scrollbar-thumb {
  background: rgba(141, 190, 255, 0.22);
  border-radius: 999px;
}

.chat-log::-webkit-scrollbar-track,
.cards::-webkit-scrollbar-track,
.folder-list::-webkit-scrollbar-track {
  background: transparent;
}

/* Responsive */
@media (max-width: 1180px) {
  body {
    overflow: auto;
  }

  .alpha-shell {
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .alpha-grid {
    height: auto;
    grid-template-columns: 1fr;
    overflow: visible;
  }

  .chat-pane {
    min-height: 640px;
  }

  .right-column {
    height: 860px;
  }
}

@media (max-width: 640px) {
  .alpha-header {
    height: auto;
    align-items: flex-start;
    flex-direction: column;
    margin-bottom: 14px;
  }

  .alpha-grid {
    height: auto;
  }

  .chat-input-row {
    grid-template-columns: 1fr;
  }

  .chat-input-row .btn {
    width: 100%;
  }

  .seal {
    white-space: normal;
  }
}
