:root {
  color-scheme: dark;
  --bg: #030d17;
  --panel: #091b2a;
  --line: #15364e;
  --cyan: #36d8ff;
  --gold: #f4c454;
  --green: #45e59a;
  --red: #ff6573;
  --text: #eef8ff;
  --muted: #8da9bb;
}
#provider-status.warning { color: var(--gold); }
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: radial-gradient(circle at top, #0b2840, var(--bg) 42%);
  color: var(--text);
  font:
    15px Inter,
    system-ui,
    sans-serif;
  min-height: 100vh;
}
main {
  width: min(980px, 100%);
  margin: auto;
  padding: 24px;
}
.card {
  background: linear-gradient(
    145deg,
    rgba(11, 31, 48, 0.96),
    rgba(5, 20, 32, 0.98)
  );
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 22px;
  box-shadow: 0 22px 80px #0008;
}
.login {
  width: min(430px, 100%);
  margin: 8vh auto;
  text-align: center;
}
.shield {
  margin: auto;
  width: 68px;
  height: 74px;
  display: grid;
  place-items: center;
  border: 3px solid var(--gold);
  clip-path: polygon(50% 0, 100% 18%, 91% 76%, 50% 100%, 9% 76%, 0 18%);
  font-size: 30px;
  font-weight: 900;
  color: var(--gold);
}
h1 {
  margin: 0.2rem 0 1rem;
}
.eyebrow {
  letter-spacing: 0.18em;
  color: var(--cyan);
  font-size: 0.75rem;
  font-weight: 800;
}
label {
  display: block;
  text-align: left;
  margin: 14px 0;
  color: var(--muted);
}
input,
textarea,
select {
  display: block;
  width: 100%;
  margin-top: 7px;
  background: #06131f;
  border: 1px solid #24516e;
  border-radius: 12px;
  color: var(--text);
  padding: 14px;
  font: inherit;
}
textarea {
  min-height: 130px;
  resize: vertical;
}
button,
a {
  border: 0;
  border-radius: 12px;
  background: var(--gold);
  color: #101820;
  padding: 13px 18px;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}
.ghost,
nav button,
#decisions button {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}
header,
.row,
.statusline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
nav {
  display: flex;
  gap: 8px;
  overflow: auto;
  margin: 18px 0;
}
nav button.active {
  border-color: var(--cyan);
  color: var(--cyan);
}
.command {
  margin-bottom: 18px;
}
.row {
  margin-top: 14px;
}
.row select {
  margin: 0;
}
.row button {
  white-space: nowrap;
}
.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 18px 0;
}
.grid article {
  background: #061521;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
}
.grid small {
  display: block;
  color: var(--cyan);
  margin-bottom: 8px;
}
.grid strong {
  line-height: 1.45;
}
.badge {
  color: var(--green);
  font-weight: 900;
  letter-spacing: 0.1em;
}
.meter {
  height: 10px;
  background: #04101a;
  border-radius: 8px;
  overflow: hidden;
}
.meter i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--green));
  width: 0;
}
ol {
  list-style: none;
  padding: 0;
}
ol li {
  display: flex;
  justify-content: space-between;
  border-left: 2px solid var(--cyan);
  padding: 10px 14px;
  margin: 8px 0;
  background: #061521;
}
ol small {
  color: var(--muted);
}
#decisions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}
.approve {
  border-color: var(--gold) !important;
  color: var(--gold) !important;
}
.danger {
  border-color: var(--red) !important;
  color: var(--red) !important;
}
.error {
  color: var(--red);
}
#conversation {
  max-height: 360px;
  overflow: auto;
  margin-top: 15px;
}
.message {
  padding: 12px 14px;
  border-left: 3px solid var(--gold);
  background: #061521;
  border-radius: 10px;
  margin: 8px 0;
}
.message.assistant {
  border-color: var(--cyan);
}
.message b {
  color: var(--gold);
}
.message.assistant b {
  color: var(--cyan);
}
.message p {
  white-space: pre-wrap;
  margin: 0.4rem 0 0;
  line-height: 1.5;
}
.promptbox {
  position: relative;
}
.promptbox textarea {
  padding-right: 78px;
}
.voice {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 10px;
  background: var(--cyan);
}
.voice.listening {
  background: var(--red);
  color: white;
  animation: pulse 1s infinite;
}
.passwordbox {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.passwordbox input {
  margin: 0;
}
.passwordbox button {
  min-width: 72px;
  padding: 10px;
}
.remember {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
}
.remember input {
  width: auto;
  margin: 0;
}
.studio {
  margin-top: 18px;
}
.studio-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(240px, 0.7fr);
  gap: 20px;
}
.canvas-wrap {
  min-height: 360px;
  display: grid;
  place-items: center;
  position: relative;
  background: #020a11;
  border: 1px dashed #2b5873;
  border-radius: 16px;
  overflow: hidden;
}
.canvas-wrap canvas {
  display: none;
  width: 100%;
  height: auto;
  max-height: 70vh;
  object-fit: contain;
}
.studio-controls {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.studio-controls label {
  margin: 0;
}
.studio-controls textarea {
  min-height: 90px;
}
.upload {
  display: inline-block;
  border: 1px solid var(--cyan);
  border-radius: 12px;
  padding: 12px 16px;
  color: var(--cyan);
  font-weight: 800;
  cursor: pointer;
  margin-bottom: 16px;
}
.upload input {
  display: none;
}
.asset-library {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.asset-library h3 {
  margin: 3px 0 0;
}
.preset-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 0 16px;
}
.preset-row button {
  white-space: nowrap;
}
.asset-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.asset-card {
  background: #061521;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
.asset-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}
.asset-card div {
  padding: 10px;
}
.asset-card b,
.asset-card small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.asset-card small {
  color: var(--muted);
  margin-top: 4px;
}
@keyframes pulse {
  50% {
    transform: scale(1.04);
  }
}
#website-inspection [data-inspection-report] {
  overflow-wrap: anywhere;
}
@media (max-width: 760px) {
  .studio-grid {
    grid-template-columns: 1fr;
  }
  .canvas-wrap {
    min-height: 280px;
  }
  .asset-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 650px) {
  main {
    padding: 14px;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .row {
    align-items: stretch;
    flex-direction: column;
  }
  .row button {
    width: 100%;
  }
  header h1 {
    font-size: 1.4rem;
  }
  .card {
    padding: 17px;
  }
}
