:root {
  color-scheme: dark;
  --bg: #151318;
  --panel: #211e27;
  --border: #3b3543;
  --text: #f3eff7;
  --muted: #b5adbf;
  --purple: #d2b5ff;
  --green: #a5dfbd;
  font:
    14px/1.5 -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--text);
  background: var(--bg);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: radial-gradient(ellipse at 75% 0, #33263f80, transparent 50%);
  min-height: 100vh;
}
button,
input,
select {
  font: inherit;
}
button,
a,
select {
  touch-action: manipulation;
}
button,
.button,
select {
  min-height: 36px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 12px;
  background: #2b2633;
  color: var(--text);
}
button,
.button,
summary,
select {
  cursor: pointer;
}
button:hover,
.button:hover {
  background: #3a3046;
}
button.primary,
.button.primary {
  background: var(--purple);
  color: #20132e;
  border-color: var(--purple);
  font-weight: 650;
}
a {
  color: var(--purple);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
button:focus-visible,
a:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--purple);
  outline-offset: 3px;
}
.review {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 7px 28px;
  background: #100e13;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  color: var(--muted);
}
.review strong {
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--purple);
}
.review select {
  margin-left: auto;
  font-size: 12px;
  min-height: 30px;
  padding: 3px 8px;
}
header {
  height: 76px;
  display: flex;
  align-items: center;
  gap: 30px;
  padding: 0 32px;
  border-bottom: 1px solid var(--border);
  background: #201c25b0;
  backdrop-filter: blur(18px);
}
.brand {
  font-size: 20px;
  font-weight: 650;
  color: var(--text);
  white-space: nowrap;
}
.logo {
  color: var(--purple);
  font-size: 28px;
  vertical-align: middle;
  margin-right: 7px;
}
nav {
  display: flex;
  gap: 22px;
}
nav a {
  color: var(--muted);
}
.identity {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 20px;
}
.identity label {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}
.identity select {
  font-size: 13px;
}
.avatar {
  border: 1px solid #75618e;
  background: #473351;
  color: #f0dfff;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  font-size: 12px;
}
summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
}
small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
details {
  position: relative;
}
.account-menu {
  position: absolute;
  right: 0;
  top: 49px;
  min-width: 232px;
  z-index: 5;
  background: #29232f;
  border: 1px solid #60516f;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 16px 48px #0008;
}
.account-menu a,
.account-menu button {
  display: block;
  margin-top: 14px;
}
.account-menu button {
  width: 100%;
  text-align: left;
}
main {
  max-width: 1100px;
  margin: auto;
  padding: 25px 32px 28px;
  min-height: 540px;
}
h1 {
  font-size: 28px;
  letter-spacing: -0.7px;
  line-height: 1.2;
  margin: 5px 0 9px;
}
h2 {
  font-size: 17px;
  line-height: 1.3;
  margin: 0 0 5px;
}
h3 {
  font-size: 14px;
  margin: 0;
}
p {
  margin: 6px 0 15px;
  color: var(--muted);
}
.muted {
  color: var(--muted);
}
.eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: var(--purple);
}
.heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  gap: 16px;
}
.heading p {
  margin-bottom: 0;
}
.card {
  background: linear-gradient(130deg, #2b2632c9, #201c25dd);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
}
.grid {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 16px;
}
.stat-row {
  display: flex;
  gap: 30px;
  margin: 14px 0 4px;
}
.stat-row strong {
  font-size: 20px;
  display: block;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 5px;
  background: #2a3930;
  color: var(--green);
  white-space: nowrap;
}
.badge.neutral {
  background: #39313f;
  color: #d6c4e8;
}
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 22px 0 10px;
}
.section-head p {
  margin: 2px 0 0;
  font-size: 12px;
}
.table-wrap {
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #1d1922;
}
table {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
  white-space: nowrap;
}
th {
  font-size: 11px;
  font-weight: 550;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted);
  background: #27212e;
}
th,
td {
  padding: 10px 14px;
  border-bottom: 1px solid #332c3b;
}
tr:last-child td {
  border-bottom: 0;
}
td {
  font-size: 13px;
}
td button {
  font-size: 12px;
  min-height: 30px;
  padding: 3px 10px;
}
td:last-child {
  text-align: right;
}
.service {
  display: flex;
  align-items: center;
  gap: 14px;
}
.service-icon {
  width: 58px;
  height: 58px;
  border-radius: 13px;
  background: linear-gradient(145deg, #654c89, #272035);
  display: grid;
  place-items: center;
  font-size: 29px;
  color: #e5ccff;
  border: 1px solid #69547f;
}
.actions {
  display: flex;
  align-items: center;
  gap: 9px;
}
.meta {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
  margin: 17px 0;
}
.tabs {
  display: flex;
  gap: 24px;
  margin: 22px 0 12px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
}
.tabs strong {
  color: var(--purple);
}
.notice {
  padding: 10px 13px;
  border: 1px solid #605073;
  border-radius: 8px;
  background: #352b4280;
  font-size: 12px;
  margin: 14px 0;
  color: #d6c5e8;
}
.notice.success {
  border-color: #405f4a;
  background: #23392b70;
  color: var(--green);
}
.notice.error {
  border-color: #895458;
  color: #f5bdc1;
  background: #43272c;
}
.row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.row:last-child {
  border: 0;
}
.row span small {
  margin-top: 2px;
}
dialog {
  width: min(472px, calc(100vw - 32px));
  border: 1px solid #665372;
  border-radius: 15px;
  background: linear-gradient(145deg, #302738, #211c28);
  color: var(--text);
  padding: 25px;
  box-shadow: 0 30px 100px #0009;
}
dialog::backdrop {
  background: #09070cb3;
  backdrop-filter: blur(4px);
}
dialog h2 {
  font-size: 22px;
  letter-spacing: -0.4px;
  margin: 8px 0;
}
dialog .close {
  position: absolute;
  right: 16px;
  top: 14px;
  min-height: 28px;
  padding: 1px 8px;
  background: transparent;
}
dialog .primary {
  width: 100%;
  margin-top: 10px;
}
dialog .cancel {
  display: block;
  margin: 10px auto 0;
  background: transparent;
  border: 0;
}
label.field {
  display: block;
  font-size: 12px;
  margin: 12px 0 5px;
  font-weight: 550;
}
input:disabled {
  width: 100%;
  height: 38px;
  background: #19151f;
  color: #b5a8c2;
  border: 1px solid #50435c;
  border-radius: 7px;
  padding: 8px 12px;
  opacity: 1;
}
.qr {
  display: grid;
  place-items: center;
  width: 100px;
  height: 100px;
  background: #ede6f4;
  color: #34263f;
  border-radius: 8px;
  font-size: 11px;
  text-align: center;
  border: 8px solid #fff;
  flex-shrink: 0;
}
.qr-row {
  display: flex;
  gap: 17px;
  align-items: center;
  margin: 17px 0;
}
.qr-row p {
  font-size: 13px;
  margin: 0;
}
.subtle {
  font-size: 12px;
}
.scope {
  background: #1a1620;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  margin: 12px 0;
}
.scope .row {
  padding: 4px 0;
  border: 0;
  font-size: 12px;
}
.scope b {
  font-weight: 550;
}
.scenarios {
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 11px;
  flex-wrap: wrap;
}
.scenarios button {
  font-size: 11px;
  min-height: 25px;
  padding: 2px 7px;
  background: transparent;
}
footer {
  max-width: 1100px;
  margin: auto;
  border-top: 1px solid var(--border);
  padding: 12px 32px;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
}
.filter {
  display: flex;
  gap: 8px;
  align-items: center;
}
.breadcrumbs {
  font-size: 12px;
  margin-bottom: 17px;
}
.account-title {
  display: flex;
  align-items: center;
  gap: 11px;
}
.account-title .avatar {
  width: 44px;
  height: 44px;
  font-size: 15px;
}
@media (max-width: 800px) {
  header {
    height: auto;
    min-height: 76px;
    padding: 14px 18px;
    flex-wrap: wrap;
    gap: 16px;
  }
  nav {
    order: 3;
    width: 100%;
  }
  .identity {
    gap: 12px;
  }
  .identity summary small {
    display: none;
  }
  .identity label {
    font-size: 0;
  }
  main {
    padding: 22px 18px;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .review {
    padding: 8px 18px;
  }
  .review > span {
    display: none;
  }
  .heading {
    align-items: flex-start;
  }
  .stat-row {
    gap: 22px;
  }
  footer {
    gap: 16px;
    padding: 12px 18px;
  }
  .meta {
    gap: 12px;
  }
}
.catalog-filter {
  display: flex;
  gap: 14px;
  align-items: end;
}
.catalog-filter label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12px;
  color: var(--muted);
}
.catalog-filter label:first-child {
  flex: 1;
}
.catalog-filter input[type="search"],
textarea {
  background: #1b1720;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 12px;
  font: inherit;
}
.catalog-filter .check {
  flex-direction: row;
  align-items: center;
  min-height: 38px;
}
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.catalog-card {
  padding: 14px;
}
.catalog-card .row {
  border: 0;
  padding: 0;
  margin-bottom: 10px;
}
.catalog-card .row:last-child {
  margin: 0;
}
.catalog-card h2 {
  font-size: 16px;
}
.catalog-card p {
  font-size: 12px;
  min-height: 36px;
  margin: 8px 0 12px;
}
.mini-icon {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid #61506f;
  background: #3b2d4c;
  border-radius: 8px;
  color: var(--purple);
  font-size: 20px;
}
.narrow {
  max-width: 560px;
}
.upload-area {
  border: 1px dashed #6c5b7e;
  border-radius: 10px;
  text-align: center;
  padding: 25px 16px;
  margin: 18px 0;
}
.upload-area h2 {
  margin-top: 10px;
}
.upload-area p {
  font-size: 12px;
}
textarea {
  display: block;
  width: 100%;
  min-height: 180px;
  resize: vertical;
}
.metric {
  font-size: 28px;
  color: var(--purple);
}
progress {
  width: 100%;
  height: 7px;
  margin: 20px 0;
  accent-color: var(--purple);
}
.filter label {
  font-size: 12px;
}
.filter [aria-pressed="true"] {
  border-color: var(--purple);
  background: #4b365f;
}
@media (max-width: 800px) {
  .catalog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .catalog-filter {
    flex-wrap: wrap;
  }
}
@media (max-width: 500px) {
  .catalog-grid {
    grid-template-columns: 1fr;
  }
  .catalog-filter label:first-child {
    flex-basis: 100%;
  }
}
#s3-prefix {
  min-height: 34px;
  background: #211b29;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 5px 9px;
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.transcript-table th:last-child, .transcript-table td:last-child { text-align: left; white-space: normal; width: 58%; }
