﻿:root {
  color-scheme: light;
  --ink: #17324d;
  --muted: #5f7287;
  --line: #dbe6f2;
  --paper: #f4f9ff;
  --panel: #ffffff;
  --brand: #4f9fe9;
  --brand-dark: #17324d;
  --brand-bright: #8fd2ff;
  --ok: #2f83cf;
  --soft: #edf6ff;
  --danger: #b72d3b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: radial-gradient(circle at top left, rgba(143, 210, 255, 0.28), transparent 34%), var(--paper);
  color: var(--ink);
}

a {
  color: var(--brand);
}

.topbar {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 10px 32px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(13, 31, 51, 0.06);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
}

.brand-logo {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 8px;
  background: white;
}

.nav {
  display: flex;
  gap: 18px;
  font-size: 14px;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
}

main {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 52px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 24px;
  align-items: stretch;
}

.hero-copy,
.status-panel,
.section,
.key-panel,
.admin-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 16px 42px rgba(13, 31, 51, 0.08);
}

.hero-copy {
  padding: 38px;
}

.eyebrow {
  display: inline-flex;
  color: var(--ok);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 14px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: 42px;
  line-height: 1.12;
  letter-spacing: 0;
  margin-bottom: 16px;
}

h2 {
  font-size: 24px;
  margin-bottom: 12px;
}

p,
li {
  color: var(--muted);
  line-height: 1.65;
}

.lead {
  font-size: 17px;
  margin-bottom: 0;
}

.status-panel,
.key-panel {
  padding: 24px;
}

.score {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.score strong {
  font-size: 44px;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: var(--soft);
  color: var(--ok);
  border: 1px solid #cfe8ff;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 700;
}

.meter {
  height: 10px;
  background: #e7eff7;
  border-radius: 999px;
  margin: 18px 0;
  overflow: hidden;
}

.meter span {
  display: block;
  width: 86%;
  height: 100%;
  background: linear-gradient(90deg, var(--brand), var(--brand-bright));
}

.status-grid {
  display: grid;
  gap: 12px;
}

.status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}

.status-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.sections {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  margin-top: 24px;
}

.key-panel {
  width: 100%;
  margin: 0 auto;
  order: -1;
}

.section,
.admin-panel {
  padding: 28px;
  margin-bottom: 24px;
}

.checklist {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}

.check-item {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 14px;
  align-items: start;
  padding: 14px;
  background: #fbfdff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.check-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--soft);
  color: var(--ok);
  font-weight: 700;
}

.check-item strong {
  display: block;
  margin-bottom: 4px;
}

.check-item span {
  color: var(--muted);
  line-height: 1.55;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.full {
  grid-column: 1 / -1;
}

label {
  display: grid;
  gap: 10px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.field-group {
  display: grid;
  gap: 10px;
}

.field-label {
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #cfddea;
  border-radius: 8px;
  padding: 12px 13px;
  color: var(--ink);
  font: inherit;
  background: #ffffff;
}

textarea {
  resize: vertical;
  min-height: 92px;
}

button,
.button {
  width: 100%;
  border: 0;
  border-radius: 8px;
  padding: 13px 16px;
  background: var(--brand);
  color: #ffffff;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
}

.file-fallback-button {
  width: auto;
  justify-self: start;
  padding: 10px 14px;
  background: #ffffff;
  color: var(--brand-dark);
  border: 1px solid #cfddea;
}

.hidden-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

button.secondary {
  background: var(--brand-dark);
}

button:disabled {
  opacity: 0.62;
  cursor: not-allowed;
}

.delete-button {
  width: auto;
  padding: 8px 12px;
  background: #fff3f4;
  color: var(--danger);
  border: 1px solid #ffd2d7;
}

.delete-button:hover {
  background: #ffe5e8;
}

.view-image-button {
  width: auto;
  padding: 8px 12px;
  background: #edf6ff;
  color: var(--brand-dark);
  border: 1px solid #cfe8ff;
}

.repo-button {
  margin-top: 8px;
}

.repo-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.image-modal[hidden] {
  display: none;
}

.image-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
}

.image-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 27, 43, 0.66);
}

.image-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(980px, 100%);
  max-height: calc(100vh - 48px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
}

.image-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.source-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.image-modal-close {
  width: auto;
  padding: 8px 12px;
  background: var(--brand-dark);
}

.image-modal-body {
  overflow: auto;
  padding: 16px;
  background: #f4f9ff;
}

.image-modal-body img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  border-radius: 6px;
}

.key-box {
  display: grid;
  gap: 12px;
}

#copyButton {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: linear-gradient(135deg, #55b2ff 0%, #398fe3 52%, #2374c7 100%);
  box-shadow: 0 10px 24px rgba(35, 116, 199, 0.28);
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
  animation: copy-button-pulse 2.8s ease-in-out infinite;
}

#copyButton::after {
  content: "";
  position: absolute;
  inset: -40% auto -40% -28%;
  z-index: -1;
  width: 28%;
  background: rgba(255, 255, 255, 0.42);
  transform: translateX(-220%) rotate(18deg);
  animation: copy-button-shine 3.8s ease-in-out infinite;
}

#copyButton:hover {
  transform: translateY(-2px) scale(1.01);
  filter: saturate(1.12) brightness(1.04);
  box-shadow: 0 14px 30px rgba(35, 116, 199, 0.38);
}

#copyButton:active {
  transform: translateY(0) scale(0.99);
}

#copyButton:focus-visible {
  outline: 3px solid rgba(35, 116, 199, 0.28);
  outline-offset: 3px;
}

@keyframes copy-button-pulse {
  0%,
  100% {
    box-shadow: 0 10px 24px rgba(35, 116, 199, 0.28);
  }

  50% {
    box-shadow: 0 14px 32px rgba(35, 116, 199, 0.42);
  }
}

@keyframes copy-button-shine {
  0%,
  58%,
  100% {
    transform: translateX(-220%) rotate(18deg);
  }

  78% {
    transform: translateX(650%) rotate(18deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  #copyButton,
  #copyButton::after {
    animation: none;
  }
}

.key-value {
  word-break: break-all;
  padding: 14px;
  border-radius: 8px;
  border: 1px dashed #b7d8f5;
  background: #fbfdff;
  color: var(--brand-dark);
  font-family: Consolas, Monaco, monospace;
  font-size: 13px;
}

.instruction-list {
  display: grid;
  gap: 16px;
  margin: 12px 0 22px;
  padding-left: 24px;
}

.instruction-list li {
  color: var(--ink);
  line-height: 1.78;
  padding-left: 4px;
}

kbd {
  display: inline-block;
  min-width: 24px;
  padding: 2px 8px;
  margin: 0 3px;
  border: 1px solid #b9c9d9;
  border-bottom-width: 2px;
  border-radius: 6px;
  background: #ffffff;
  color: var(--brand-dark);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  box-shadow: 0 1px 0 rgba(13, 31, 51, 0.08);
}

.key-panel h3 {
  margin: 28px 0 12px;
  font-size: 24px;
  line-height: 1.25;
}

.upload-paste-zone {
  display: grid;
  min-height: 132px;
  align-content: start;
  padding: 12px;
  border: 1px solid #cfddea;
  border-radius: 8px;
  background: #ffffff;
  color: var(--brand-dark);
  cursor: pointer;
}

.chat-upload-zone::before {
  content: "Ctrl + V để dán ảnh chụp màn hình";
  color: #8a9bad;
  font-size: 14px;
  font-weight: 400;
}

.chat-upload-zone[data-os="mac"]::before {
  content: "Command + V để dán ảnh chụp màn hình";
}

.chat-upload-zone[data-os="ubuntu"]::before {
  content: "Ctrl + Shift + V để dán ảnh chụp màn hình";
}

.upload-paste-zone:focus,
.upload-paste-zone.has-file {
  outline: 0;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(79, 159, 233, 0.12);
}

.upload-paste-zone.has-file::before {
  content: "";
}

.upload-preview {
  width: 120px;
  height: 78px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #dbe6f2;
  background: #f4f9ff;
}

.upload-status {
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
}

.notice,
.result {
  margin-top: 14px;
  border-radius: 8px;
  padding: 14px;
  background: var(--soft);
  color: var(--brand-dark);
  border: 1px solid #cfe8ff;
  line-height: 1.55;
}

.error {
  background: #fff3f4;
  color: var(--danger);
  border-color: #ffd2d7;
}

.warning {
  margin-top: 14px;
  padding: 14px;
  border-left: 4px solid var(--brand);
  background: #fbfdff;
  color: var(--muted);
  line-height: 1.55;
}

.source {
  font-size: 13px;
}

.admin-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 140px;
  gap: 12px;
  margin-top: 16px;
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
}

.admin-tab {
  width: auto;
  padding: 10px 14px;
  background: #ffffff;
  color: var(--brand-dark);
  border: 1px solid #cfddea;
}

.admin-tab.active {
  background: var(--brand-dark);
  color: #ffffff;
  border-color: var(--brand-dark);
}

.admin-view {
  display: none;
}

.admin-view.active {
  display: block;
}

.table-wrap {
  overflow-x: auto;
}

.source-dialog {
  width: min(1180px, 100%);
}

.source-modal-body {
  display: grid;
  gap: 12px;
}

.source-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
}

.source-toolbar button {
  flex: 0 0 auto;
}

#sourcePathLabel {
  color: var(--muted);
  font-family: Consolas, Monaco, monospace;
  overflow-wrap: anywhere;
}

.source-browser {
  display: grid;
  grid-template-columns: minmax(220px, 0.34fr) minmax(0, 1fr);
  gap: 12px;
  min-height: 520px;
}

.source-list {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.source-entry {
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: #ffffff;
  color: var(--brand-dark);
  text-align: left;
}

.source-entry:hover {
  background: #edf6ff;
}

.source-kind {
  color: var(--muted);
  font-size: 12px;
}

.source-preview {
  margin: 0;
  min-height: 520px;
  max-height: 68vh;
  overflow: auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #111827;
  color: #edf3ff;
  font-family: Consolas, Monaco, monospace;
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
}

th,
td {
  text-align: left;
  border-bottom: 1px solid var(--line);
  padding: 12px;
  vertical-align: top;
  font-size: 14px;
}

th {
  color: var(--brand-dark);
  background: #f7fbff;
}

td {
  color: var(--muted);
}

.muted-small {
  color: #7d8da0;
  font-size: 12px;
}

@media (max-width: 860px) {
  .nav {
    display: none;
  }

  .hero,
  .sections,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .source-browser {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    padding: 28px;
  }

  h1 {
    font-size: 32px;
  }
}

body.admin-surface {
  color-scheme: dark;
  --ink: #eef7f3;
  --muted: #96a7ad;
  --line: #26313a;
  --paper: #05070b;
  --panel: #0b0f16;
  --brand: #b4ff39;
  --brand-dark: #e9fff4;
  --brand-bright: #35f6ff;
  --ok: #b4ff39;
  --soft: #101923;
  --danger: #ff5c7c;
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgba(180, 255, 57, 0.05) 1px, transparent 1px),
    linear-gradient(0deg, rgba(53, 246, 255, 0.04) 1px, transparent 1px),
    linear-gradient(135deg, #05070b 0%, #080d14 44%, #0f0716 100%);
  background-size: 48px 48px, 48px 48px, auto;
  font-family: "Fira Sans", "Inter", Arial, Helvetica, sans-serif;
}

body.admin-surface::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    repeating-linear-gradient(90deg, transparent 0 118px, rgba(180, 255, 57, 0.06) 118px 119px),
    linear-gradient(180deg, rgba(180, 255, 57, 0.08), transparent 18%, transparent 74%, rgba(53, 246, 255, 0.06));
}

body.admin-surface a {
  color: #35f6ff;
}

body.admin-surface .topbar {
  background: rgba(5, 7, 11, 0.92);
  border-bottom-color: rgba(180, 255, 57, 0.24);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(14px);
}

body.admin-surface .brand {
  color: #eef7f3;
  letter-spacing: 0;
}

body.admin-surface .brand-logo {
  background: #ffffff;
  box-shadow: 0 0 0 1px rgba(180, 255, 57, 0.22), 0 0 22px rgba(180, 255, 57, 0.16);
}

.admin-live-signal {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid rgba(180, 255, 57, 0.28);
  border-radius: 8px;
  background: rgba(16, 25, 35, 0.82);
  color: #b4ff39;
  font-family: "Fira Code", Consolas, Monaco, monospace;
  font-size: 12px;
}

.admin-live-signal span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #b4ff39;
  box-shadow: 0 0 14px rgba(180, 255, 57, 0.82);
}

body.admin-surface main {
  width: min(1480px, calc(100% - 32px));
  padding-top: 24px;
}

body.admin-surface .admin-panel {
  background: rgba(11, 15, 22, 0.92);
  border: 1px dashed rgba(180, 255, 57, 0.28);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.34);
}

body.admin-surface .admin-command {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 18px;
  align-items: end;
  position: relative;
  overflow: hidden;
}

body.admin-surface .admin-command::after {
  content: "risk_detected!   repo_scope:read   oauth:active   audit:continuous";
  position: absolute;
  right: 18px;
  top: 14px;
  color: rgba(53, 246, 255, 0.36);
  font-family: "Fira Code", Consolas, Monaco, monospace;
  font-size: 11px;
}

body.admin-surface .admin-command h1 {
  max-width: 840px;
  margin-bottom: 10px;
  color: #f7fff9;
  font-size: 44px;
  line-height: 1.03;
}

body.admin-surface .admin-command p {
  max-width: 780px;
  margin-bottom: 0;
}

body.admin-surface .eyebrow {
  color: #b4ff39;
  font-family: "Fira Code", Consolas, Monaco, monospace;
  letter-spacing: 0;
}

.admin-console-card {
  display: grid;
  gap: 8px;
  padding: 15px;
  border: 1px solid rgba(53, 246, 255, 0.2);
  border-radius: 8px;
  background: #070b10;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.admin-console-card code {
  color: #35f6ff;
  font-family: "Fira Code", Consolas, Monaco, monospace;
  font-size: 12px;
  white-space: normal;
}

body.admin-surface .admin-toolbar {
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1fr) 170px;
  margin-top: 0;
}

body.admin-surface input,
body.admin-surface select,
body.admin-surface textarea {
  background: #070b10;
  border-color: rgba(180, 255, 57, 0.22);
  color: #eef7f3;
}

body.admin-surface input:focus,
body.admin-surface select:focus,
body.admin-surface textarea:focus,
body.admin-surface button:focus-visible {
  outline: 0;
  border-color: #b4ff39;
  box-shadow: 0 0 0 3px rgba(180, 255, 57, 0.18);
}

body.admin-surface button,
body.admin-surface .button {
  background: #b4ff39;
  color: #08100d;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, color 160ms ease;
}

body.admin-surface button:hover {
  transform: translateY(-1px);
}

body.admin-surface .encrypt-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  min-height: 44px;
  padding: 12px 20px;
  border: 1px solid rgba(180, 255, 57, 0.42);
  border-radius: 8px;
  background: #f8ffe8;
  color: #06100a;
  white-space: nowrap;
  user-select: none;
  box-shadow: 0 0 0 1px rgba(180, 255, 57, 0.08), 0 0 28px rgba(180, 255, 57, 0.16);
}

body.admin-surface .encrypt-button:hover,
body.admin-surface .encrypt-button:focus-visible {
  background: #b4ff39;
  color: #06100a;
  border-color: #35f6ff;
}

.encrypt-sweep {
  position: absolute;
  inset: -45%;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-120%) scaleX(1.18);
  background: linear-gradient(to bottom, transparent 28%, rgba(53, 246, 255, 0.78) 50%, transparent 54%);
}

.encrypt-button:hover .encrypt-sweep,
.encrypt-button:focus-visible .encrypt-sweep {
  opacity: 1;
  animation: encrypt-sweep 580ms linear 2;
}

.encrypt-label {
  position: relative;
  z-index: 1;
  display: inline-block;
  font-family: "Fira Code", Consolas, Monaco, monospace;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
}

.encrypt-measure {
  visibility: hidden;
}

.encrypt-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

@keyframes encrypt-sweep {
  0% {
    transform: translateY(-120%) scaleX(1.18);
  }

  100% {
    transform: translateY(120%) scaleX(1.18);
  }
}

@keyframes metric-scan {
  0% {
    transform: translateX(-100%);
  }

  48%,
  100% {
    transform: translateX(100%);
  }
}

.admin-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 18px;
}

.admin-metrics article {
  min-height: 108px;
  padding: 16px;
  border: 1px dashed rgba(53, 246, 255, 0.24);
  border-radius: 8px;
  background: rgba(7, 11, 16, 0.88);
  position: relative;
  overflow: hidden;
}

.admin-metrics article::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #35f6ff, #b4ff39, transparent);
  transform: translateX(-100%);
  animation: metric-scan 4.6s linear infinite;
}

.admin-metrics span {
  display: block;
  margin-bottom: 12px;
  color: #96a7ad;
  font-size: 12px;
  text-transform: uppercase;
}

.admin-metrics strong {
  color: #f7fff9;
  font-family: "Fira Code", Consolas, Monaco, monospace;
  font-size: 36px;
  line-height: 1;
}

body.admin-surface .admin-tabs {
  position: sticky;
  top: 65px;
  z-index: 8;
  padding: 9px;
  border: 1px solid rgba(180, 255, 57, 0.16);
  border-radius: 8px;
  background: rgba(5, 7, 11, 0.88);
  backdrop-filter: blur(12px);
}

.admin-workbench {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.admin-sidecar {
  position: sticky;
  top: 82px;
  display: grid;
  gap: 20px;
  min-height: calc(100vh - 106px);
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-right-color: rgba(180, 255, 57, 0.18);
  border-radius: 8px;
  background: rgba(28, 28, 30, 0.88);
}

.sidecar-search {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(5, 7, 11, 0.58);
  color: #eef7f3;
}

.sidecar-search span {
  width: 13px;
  height: 13px;
  border: 2px solid #aeb7bb;
  border-radius: 50%;
  box-shadow: 7px 7px 0 -5px #aeb7bb;
}

.sidecar-search strong {
  flex: 1;
  min-width: 0;
  color: #cfd8dc;
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidecar-search kbd {
  min-width: auto;
  margin: 0;
  border-color: rgba(255, 255, 255, 0.16);
  background: #242427;
  color: #cfd8dc;
  box-shadow: none;
  font-family: "Fira Code", Consolas, Monaco, monospace;
  font-size: 11px;
}

.sidecar-group {
  display: grid;
  gap: 8px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidecar-group p {
  margin: 0 0 4px;
  color: #eef7f3;
  font-family: "Fira Code", Consolas, Monaco, monospace;
  font-size: 11px;
  font-weight: 800;
}

.sidecar-link {
  width: 100%;
  justify-content: flex-start;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.02) !important;
  color: #aeb7bb !important;
  text-align: left;
}

.sidecar-link.active,
.sidecar-link:hover {
  background: rgba(180, 255, 57, 0.1) !important;
  border-color: rgba(180, 255, 57, 0.28);
  color: #b4ff39 !important;
}

.sidecar-count {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 31px;
  color: #aeb7bb;
  font-size: 13px;
}

.sidecar-count b {
  color: #cfd8dc;
  font-family: "Fira Code", Consolas, Monaco, monospace;
}

.sidecar-auth-link {
  align-self: end;
  display: block;
  padding: 12px 14px;
  background: #ffffff;
  color: #05070b !important;
  text-decoration: none;
  font-weight: 800;
  text-align: center;
}

.sidecar-auth-link:hover {
  background: #f2f2f2;
}

.admin-content {
  min-width: 0;
}

body.admin-surface .admin-tab {
  background: transparent;
  border-color: transparent;
  color: #96a7ad;
}

body.admin-surface .admin-tab.active,
body.admin-surface .admin-tab:hover {
  background: rgba(180, 255, 57, 0.12);
  border-color: rgba(180, 255, 57, 0.24);
  color: #b4ff39;
}

body.admin-surface h2 {
  color: #f7fff9;
  font-size: 22px;
}

body.admin-surface p,
body.admin-surface li,
body.admin-surface td {
  color: #96a7ad;
}

body.admin-surface table {
  min-width: 980px;
}

body.admin-surface th {
  color: #b4ff39;
  background: #0f151d;
  font-family: "Fira Code", Consolas, Monaco, monospace;
  font-size: 12px;
  text-transform: uppercase;
}

body.admin-surface td {
  border-bottom-color: rgba(180, 255, 57, 0.12);
}

body.admin-surface tr:hover td {
  background: rgba(180, 255, 57, 0.035);
}

body.admin-surface .view-image-button {
  background: rgba(53, 246, 255, 0.1);
  color: #35f6ff;
  border-color: rgba(53, 246, 255, 0.24);
}

body.admin-surface .delete-button {
  background: rgba(255, 92, 124, 0.1);
  color: #ff8fa6;
  border-color: rgba(255, 92, 124, 0.28);
}

body.admin-surface .result,
body.admin-surface .notice {
  background: rgba(53, 246, 255, 0.1);
  color: #d7fdff;
  border-color: rgba(53, 246, 255, 0.24);
}

body.admin-surface .error {
  background: rgba(255, 92, 124, 0.1);
  color: #ffb4c2;
  border-color: rgba(255, 92, 124, 0.28);
}

body.admin-surface .image-modal-backdrop {
  background: rgba(2, 6, 12, 0.78);
}

body.admin-surface .image-modal-dialog {
  background: #090e15;
  border: 1px solid rgba(180, 255, 57, 0.18);
}

body.admin-surface .image-modal-header {
  border-bottom-color: rgba(180, 255, 57, 0.16);
}

body.admin-surface .image-modal-body {
  background: #071019;
}

body.admin-surface .image-modal-close {
  background: #15202b;
  color: #eef7f3;
  border: 1px solid rgba(180, 255, 57, 0.2);
}

body.admin-surface .source-list {
  background: #070b10;
  border-color: rgba(180, 255, 57, 0.16);
}

body.admin-surface .source-entry {
  background: #070b10;
  color: #eef7f3;
  border-bottom-color: rgba(180, 255, 57, 0.12);
}

body.admin-surface .source-entry:hover {
  background: rgba(53, 246, 255, 0.08);
}

body.admin-surface .source-preview {
  background: #030509;
  color: #d8ffe6;
  border-color: rgba(53, 246, 255, 0.2);
}

@media (max-width: 960px) {
  body.admin-surface .admin-command,
  .admin-metrics {
    grid-template-columns: 1fr;
  }

  .admin-workbench {
    grid-template-columns: 1fr;
  }

  .admin-sidecar {
    position: static;
    min-height: 0;
  }

  body.admin-surface .admin-live-signal {
    display: none;
  }

  body.admin-surface .admin-command::after {
    display: none;
  }

  body.admin-surface .admin-toolbar {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .encrypt-button:hover .encrypt-sweep,
  .encrypt-button:focus-visible .encrypt-sweep {
    animation: none;
  }
}
