/* AIWhisper portal — same visual language as the extension panel, as a page.
   Layout stays usable down to ~320px wide (Teams side-panel width). */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: #11151d;
  color: #e6e9ef;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 13px;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 18px 10px;
}

.wrap {
  width: 100%;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #1f2430;
  border: 1px solid #2f3645;
  border-radius: 12px;
  padding: 0 0 14px;
  align-self: flex-start;
}

.head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  background: #161a23;
  border-radius: 12px 12px 0 0;
}

.head h1 {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.head-sub {
  color: #8b93a4;
  font-size: 12px;
  flex: 1;
}

.linklike {
  background: transparent;
  border: none;
  color: #8b93a4;
  font-size: 12px;
  cursor: pointer;
  text-decoration: underline;
}

.linklike:hover { color: #fff; }

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #4b5266;
}

.dot-on {
  background: #3ddc84;
  box-shadow: 0 0 6px #3ddc84;
}

.section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 14px;
}

.label,
.stream-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #8b93a4;
}

.input {
  width: 100%;
  padding: 8px 10px;
  background: #11151d;
  border: 1px solid #2f3645;
  border-radius: 8px;
  color: #e6e9ef;
  font-size: 12px;
}

.input:focus {
  outline: none;
  border-color: #5b8cff;
}

.actions {
  display: flex;
  gap: 8px;
}

.btn {
  flex: 1;
  padding: 9px 10px;
  border: none;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-start { background: #3ddc84; color: #07210f; }
.btn-end { background: #ff5d5d; color: #2a0707; }

.status {
  font-size: 12px;
  color: #9aa3b2;
  padding: 0 14px;
}

.status.ok { color: #3ddc84; }
.status.error { color: #ff8080; }

.botrow {
  display: flex;
  align-items: center;
  gap: 8px;
}

.botrow-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #8b93a4;
  font-weight: 600;
}

.card {
  background: #161b26;
  border: 1px solid #2f3645;
  border-radius: 10px;
  padding: 9px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #8b93a4;
  font-weight: 600;
}

.badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 999px;
  background: #2f3645;
  color: #cdd3df;
  text-transform: capitalize;
}

.badge.good { background: #14361f; color: #3ddc84; }
.badge.warn { background: #3a2f12; color: #f4c430; }
.badge.bad { background: #3a1414; color: #ff8080; }

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.tag {
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 6px;
  background: #222c3d;
  color: #9fb0ff;
  text-transform: capitalize;
}

.card-summary {
  font-size: 12px;
  color: #d6dbe6;
  line-height: 1.4;
}

.transcript {
  min-height: 120px;
  max-height: 44vh;
  overflow-y: auto;
  background: #11151d;
  border: 1px solid #2f3645;
  border-radius: 8px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.tline {
  line-height: 1.35;
  color: #d6dbe6;
  word-break: break-word;
}

.spk {
  font-weight: 700;
  color: #5b8cff;
}

.spk-student { color: #b18bff; }

.stream {
  min-height: 40px;
  max-height: 14vh;
  overflow-y: auto;
  background: #11151d;
  border: 1px solid #2f3645;
  border-radius: 8px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.entry {
  border-left: 2px solid #5b8cff;
  padding-left: 8px;
}

.entry.system {
  border-left-color: #4b5266;
  color: #8b93a4;
  font-style: italic;
}

/* --- tabs ------------------------------------------------------------------ */

.tabs {
  display: flex;
  gap: 6px;
  padding: 0 14px;
}

.tab {
  flex: 1;
  padding: 7px 8px;
  background: #161b26;
  border: 1px solid #2f3645;
  border-radius: 8px;
  color: #8b93a4;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.tab.active {
  background: #222c3d;
  border-color: #5b8cff;
  color: #e6e9ef;
}

.textarea {
  resize: vertical;
  font-family: inherit;
  min-height: 90px;
}

/* --- dashboard ------------------------------------------------------------- */
/* Attention-status colors (fixed order: engaged, passive, confused, disengaged).
   CVD-checked against the #161b26 surface; the worst pair (engaged/passive,
   ΔE 7.5) is legal because segments carry secondary encoding: 2px gaps plus a
   legend that always shows the count next to each status name. */

.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(105px, 1fr));
  gap: 8px;
}

.tile {
  background: #161b26;
  border: 1px solid #2f3645;
  border-radius: 10px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tile-value {
  font-size: 20px;
  font-weight: 700;
  color: #e6e9ef;
}

.tile-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #8b93a4;
}

.sess {
  background: #161b26;
  border: 1px solid #2f3645;
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.sess-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.chip {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: #222c3d;
  color: #9fb0ff;
  text-transform: capitalize;
}

.sess-when {
  font-size: 11px;
  color: #8b93a4;
  flex: 1;
}

.sess-rate {
  font-size: 14px;
  font-weight: 700;
  color: #e6e9ef;
}

.sess-names {
  font-size: 11px;
  color: #9aa3b2;
}

.bar {
  display: flex;
  gap: 2px;
  height: 14px;
  border-radius: 4px;
  overflow: hidden;
}

.seg-engaged { background: #3ddc84; }
.seg-passive { background: #f4c430; }
.seg-confused { background: #b18bff; }
.seg-disengaged { background: #ff8080; }

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
}

.lg {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  color: #9aa3b2;
  text-transform: capitalize;
}

.lg-dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  flex-shrink: 0;
}

.strip {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
}

.strip .cell {
  width: 7px;
  height: 12px;
  border-radius: 2px;
}

.strip-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #6b7384;
}

.sess-meta {
  font-size: 11px;
  color: #9aa3b2;
  line-height: 1.5;
}

.plink {
  font-size: 11.5px;
  color: #5b8cff;
  text-decoration: none;
  font-weight: 600;
}

.plink:hover { text-decoration: underline; }

.demo-note {
  font-size: 10.5px;
  color: #6b7384;
  font-style: italic;
  line-height: 1.5;
}
