:root {
  color-scheme: light;
  font-family: system-ui, sans-serif;
  color: #302c4b;
  background: #f7f5ff;
  --surface: #fffaff;
  --border: #ddd9ef;
  --muted: #625b7b;
  --accent: #674494;
  --blue: #dcecff;
  --pink: #ffe1ee;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(ellipse at top left, #d6edff, transparent 58%),
    radial-gradient(ellipse at top right, #ffe1f0, transparent 55%), #f7f5ff;
}
header { border-bottom: 1px solid #e7ddf3; background: #fffbffde; }
.header, main { max-width: 1120px; padding-inline: 24px; margin-inline: auto; }
.header { display: flex; justify-content: space-between; align-items: center; min-height: 69px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 780; }
.brand-mark {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 13px;
  font-size: 23px; color: #623c85; background: linear-gradient(145deg, #dbe8ff, #fbd3ea);
}
main { padding-block: 42px; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(27px, 5vw, 42px); letter-spacing: -.048em; line-height: 1.1; }
h2 { font-size: 20px; letter-spacing: -.018em; }
p, #username { color: var(--muted); }
.overview, .section-heading, .actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.overview, .section-heading { justify-content: space-between; gap: 18px; }
.overview {
  background: linear-gradient(110deg, #f5fbffe8, #fff2f9ed);
  padding: clamp(18px, 4vw, 28px);
  border: 1px solid #e4daf0; border-radius: 23px; box-shadow: 0 8px 28px #5047780b;
}
.status { font-size: 13px; font-weight: 670; margin-bottom: 7px; }
.status::before { content: ''; display: inline-block; width: 8px; height: 8px; background: #9788af; border-radius: 50%; margin-right: 8px; }
.status[data-state='active']::before { background: #47816d; box-shadow: 0 0 0 3px #d4f2e4; }
.status[data-state='failed']::before, .status[data-state='inactive']::before { background: #bb5282; box-shadow: 0 0 0 3px #ffd8e9; }
.status[data-state='activating']::before, .status[data-state='deactivating']::before { background: #9b6b37; box-shadow: 0 0 0 3px #ffe6cb; }
nav { display: flex; gap: 7px; flex-wrap: wrap; margin-block: 21px 15px; }
nav button { border-color: transparent; border-radius: 999px; background: #fff9ff99; color: var(--muted); }
nav button[aria-current] { border-color: #e6c6ec; color: #633c7e; background: var(--pink); }
button, input, textarea { font: inherit; }
button {
  min-height: 36px; cursor: pointer; border: 1px solid #dad4eb; border-radius: 10px;
  background: #f5f3ff; color: #463760; padding: 7px 12px; font-weight: 680; font-size: 13px;
  transition: background .15s, border-color .15s;
}
button:hover { background: #eee7fa; border-color: #cfc3e8; }
button:disabled { opacity: .55; cursor: default; }
button.primary { background: #f6d3ea; border-color: #ecbadd; color: #522f68; }
button.primary:hover { background: #f2c7e6; border-color: #dca7d1; }
button.quiet { background: #fffaff; }
button.danger { background: #ffe1e9; border-color: #efb1c8; color: #812851; }
.card, dialog { background: var(--surface); border: 1px solid var(--border); border-radius: 21px; box-shadow: 0 12px 40px #4a397c0b; }
.section-heading { padding: 20px; }
.section-heading p, .breadcrumb { margin-top: 6px; font-size: 14px; }
.breadcrumb { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; color: var(--muted); overflow-wrap: anywhere; }
.breadcrumb button, .entry { padding: 3px 5px; min-height: auto; color: var(--accent); background: transparent; border: 0; }
.table-scroll { overflow-x: auto; border-radius: 0 0 21px 21px; }
table { border-collapse: collapse; width: 100%; text-align: left; }
td, th { padding: 11px 20px; border-top: 1px solid #eee6f5; }
th { color: #584a73; font-size: 13px; font-weight: 680; background: #edf4ff; }
td:first-child { overflow-wrap: anywhere; }
td:nth-child(2) { white-space: nowrap; }
td:last-child, th:last-child { text-align: right; }
td .actions { justify-content: flex-end; gap: 6px; }
td a, .access a, .guide a { color: var(--accent); font-weight: 620; }
td a { margin-right: 4px; font-size: 13px; }
.empty, .transfer { padding: 15px 20px; }
.transfer { color: var(--accent); padding-top: 0; }
#message { padding: 12px 15px; margin-bottom: 18px; border-radius: 12px; background: #e3f2ff; color: #354970; }
#message[data-error='true'] { background: #ffe3eb; color: #7f2f55; }
.login-page { min-height: 100svh; display: grid; place-items: center; }
.login-page main { width: min(100%, 456px); padding: 24px; }
.login { padding: clamp(22px, 6vw, 30px); }
.login #message { margin: 0; }
.login form, dialog form { display: grid; gap: 16px; }
.login form { margin-top: 23px; }
.login button { min-height: 42px; }
label { display: grid; gap: 6px; font-size: 14px; font-weight: 670; }
input, textarea {
  background: #f7f8ff; color: inherit; border: 1px solid #d9d4eb;
  border-radius: 10px; padding: 10px; width: 100%;
}
#properties-form { padding: 0 20px 20px; }
textarea { display: block; min-height: 340px; resize: vertical; font: 14px/1.55 ui-monospace, Consolas, monospace; white-space: pre; }
dialog { padding: 23px; color: inherit; width: min(430px, calc(100% - 32px)); }
dialog::backdrop { background: #3e2d5266; }
dialog .actions { justify-content: flex-end; }
#file-editor-dialog { width: min(800px, calc(100% - 32px)); }
#file-editor-title { overflow-wrap: anywhere; }
#file-error { color: #922c55; }
#file-editor-form textarea { min-height: min(390px, 50vh); }
#log-output {
  margin: 0 20px 20px; height: min(58vh, 540px); overflow: auto; padding: 14px;
  background: #edf5ff; border: 1px solid #d5e0ee; border-radius: 12px;
  color: #303951; font: 13px/1.5 ui-monospace, Consolas, monospace;
  white-space: pre-wrap; overflow-wrap: anywhere;
}
.access { padding: 20px; display: grid; gap: 16px; }
.access ol { margin: 0; padding-left: 23px; }
.access li, .guide li { margin-block: 7px; }
#key-form, #key-result { display: flex; align-items: end; gap: 10px; flex-wrap: wrap; }
#key-form label, #key-result label { flex: 1 1 250px; }
.guide { max-width: 820px; }
.guide-section { padding: 20px; margin: 16px 0; }
.guide p { margin-block: 10px; }
.guide pre { padding: 12px; background: #edf5ff; border: 1px solid var(--border); border-radius: 10px; white-space: pre-wrap; overflow-wrap: anywhere; }
:focus-visible { outline: 2px solid #8060a6; outline-offset: 3px; }
@media (max-width: 600px) {
  .header, main { padding-inline: 14px; }
  main { padding-block: 24px; }
  td, th { padding-inline: 10px; }
  td .actions { min-width: 116px; }
  #username { display: none; }
}
@media (prefers-reduced-motion: reduce) { button { transition: none; } }
