:root {
  font-family: system-ui, sans-serif;
  color: #292136;
  background: #f6f2f8;
  --accent: #00bf7f;
  --purple: #660899;
  --purple-dark: #48006b;
  --muted: #6b6074;
  --border: #ded4e6;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; line-height: 1.55; }
.masthead { background: var(--purple); color: white; padding: 20px 6%; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 4px solid var(--accent); }
.evoliatis-logo { width: 200px; max-width: 100%; display: block; }
.hydra-brand { display: flex; align-items: center; gap: 14px; font-size: 26px; font-weight: 750; letter-spacing: .12em; }
.hydra-mark { display: flex; align-items: center; background: #fff; border-radius: 50%; width: 90px; height: 90px; padding: 7px; }
.hydra-mark img { width: 100%; }
.hydra-brand small { color: #72efbd; font-size: 14px; letter-spacing: 0; }
.brand-caption { display: block; font-size: 11px; letter-spacing: .03em; font-weight: 400; color: #ecddf5; }
main { width: 100%; min-width: 0; max-width: 1280px; margin: 36px auto 64px; padding: 0 36px; }
h1 { font-size: clamp(28px, 4vw, 44px); line-height: 1.2; letter-spacing: -.03em; color: var(--purple-dark); margin: 8px 0 12px; }
h2 { margin-top: 36px; line-height: 1.3; color: var(--purple-dark); }
h3 { line-height: 1.35; }
p { margin: 12px 0; }
.eyebrow { font-size: 11px; letter-spacing: .16em; font-weight: 750; color: var(--purple); margin: 0; }
.page-intro { margin-bottom: 30px; }
.page-intro > p:last-child { color: var(--muted); }
input, button, textarea { font: inherit; border-radius: 8px; padding: 11px 14px; border: 1px solid var(--border); }
input, textarea { background: white; color: inherit; max-width: 100%; }
input { display: block; width: 100%; margin: 7px 0; }
button { background: var(--accent); color: #123b30; cursor: pointer; font-weight: 650; }
button:hover { filter: brightness(.96); }
button.secondary { background: white; color: var(--purple-dark); }
button.quiet { background: transparent; color: var(--muted); border-color: transparent; }
button:disabled { opacity: .6; cursor: wait; }
label { font-weight: 600; font-size: 14px; }
a { color: var(--purple); }
.toolbar, .toolbar-end, .actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.toolbar { margin: 24px 0; }
.toolbar-end { margin-left: auto; gap: 8px; }
.badge { font-size: 12px; color: var(--purple); background: #e9dbf1; padding: 5px 10px; border-radius: 20px; }
.card { background: white; border: 1px solid var(--border); border-radius: 16px; padding: 26px; margin: 16px 0; box-shadow: 0 5px 18px #48006b06; }
.card > h2, .login-card h2 { margin-top: 8px; }
.login-card { max-width: 520px; padding: 32px; }
.login-card button { width: 100%; margin-top: 12px; }
.muted { color: var(--muted); }
small { font-size: 12px; }
.scroll { overflow: auto; border-radius: 8px; }
table { border-collapse: collapse; width: 100%; background: white; }
th, td { text-align: left; padding: 13px; border-bottom: 1px solid var(--border); font-size: 14px; white-space: pre-line; }
th { background: #f6f2f8; }
pre { white-space: pre-wrap; word-break: break-word; font-size: 13px; background: #f6f2f8; border: 1px solid var(--border); border-radius: 8px; padding: 16px; line-height: 1.7; }
code { font-family: ui-monospace, monospace; font-size: .92em; overflow-wrap: anywhere; }
summary { cursor: pointer; padding: 10px 0; }
#message, #enroll-message, #download-message { color: #a02c23; }
#message:empty, #enroll-message:empty, #download-message:empty { display: none; }
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin: 20px 0; }
.metrics div { background: #f6f2f8; border-radius: 8px; padding: 14px; }
.metrics small, .metrics strong { display: block; }
.metrics small { margin-bottom: 6px; color: var(--muted); }
.metrics strong { font-size: 16px; }
:focus-visible { outline: 3px solid var(--purple); outline-offset: 3px; }
.masthead :focus-visible { outline-color: white; }
.filter-label { display: block; max-width: 440px; margin-top: 28px; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; max-width: 680px; margin: 22px 0; }
.field.wide { grid-column: 1 / -1; }
.field small { display: block; }
.notice { border-left: 3px solid var(--purple); background: #f6f2f8; padding: 16px 20px; margin: 22px 0; border-radius: 0 8px 8px 0; font-size: 14px; }
#admin-access input { max-width: 600px; }
#enroll-result h3 { color: #146542; }
textarea { width: 100%; resize: vertical; font-family: ui-monospace, monospace; font-size: 13px; line-height: 1.6; margin: 10px 0; }
.actions { margin-bottom: 20px; }
.empty-state { border: 1px dashed #c9b4d9; border-radius: 12px; padding: 30px; text-align: center; color: var(--muted); }
.empty-state h3 { color: var(--purple-dark); }
@media (max-width: 700px) {
  .masthead { padding: 18px 20px; gap: 14px; }
  .evoliatis-logo { width: 140px; }
  .hydra-mark { width: 60px; height: 60px; padding: 4px; }
  .hydra-brand { gap: 9px; font-size: 20px; letter-spacing: .05em; }
  .brand-caption { display: none; }
  main { padding: 0 16px; margin-top: 28px; }
  .card { padding: 20px; }

  .form-grid { grid-template-columns: 1fr; gap: 14px; }
  .field.wide { grid-column: auto; }
  .metrics { grid-template-columns: 1fr; }
}
@media (max-width: 380px) {
  .evoliatis-logo { width: 112px; }
  .hydra-mark { width: 48px; height: 48px; }
}

.workspace.authenticated { display: grid; grid-template-columns: 244px minmax(0, 1fr); align-items: start; }
.workspace.sidebar-collapsed { grid-template-columns: 76px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; z-index: 10; display: flex; flex-direction: column; height: 100dvh; background: white; border-right: 1px solid var(--border); padding: 20px 12px; }
.sidebar-top { display: flex; align-items: center; gap: 10px; margin-bottom: 28px; min-height: 44px; }
.sidebar-caption { color: var(--muted); font-size: 10px; letter-spacing: .12em; font-weight: 750; white-space: nowrap; }
.menu-toggle { display: flex; align-items: center; justify-content: center; flex: 0 0 44px; width: 44px; height: 44px; padding: 11px; color: var(--purple-dark); background: #f6f2f8; border: 0; }
.sidebar svg { width: 23px; height: 23px; flex-shrink: 0; }
#primary-nav { display: flex; flex-direction: column; gap: 8px; }
.nav-link { display: flex; align-items: center; gap: 12px; padding: 13px 12px; border-radius: 9px; text-decoration: none; color: var(--muted); font-size: 14px; font-weight: 650; white-space: nowrap; min-height: 48px; }
.nav-link:hover { background: #f6f2f8; color: var(--purple); }
.nav-link[aria-current="page"] { background: #eee0f5; color: var(--purple-dark); box-shadow: inset 3px 0 var(--purple); }
.sidebar-footer { margin-top: auto; padding: 28px 12px 6px; color: var(--purple); font-size: 11px; font-weight: 750; }
.sidebar-footer span { display: block; font-weight: 400; color: var(--muted); font-size: 11px; margin-top: 5px; }
.sidebar-collapsed .nav-text { display: none; }
.sidebar-collapsed .sidebar-top { justify-content: center; }
.sidebar-collapsed .nav-link { justify-content: center; padding: 13px 0; }
.client-download { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 20px; border: 1px solid var(--border); border-radius: 10px; background: #faf7fc; margin: 24px 0; }
.client-download strong { color: var(--purple-dark); }
.client-download p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.client-download button { flex-shrink: 0; }
#servers-view .filter-label { margin-top: 0; margin-bottom: 24px; }
#servers-view .empty-state { padding: 60px 24px; }
#page-title:focus, #enrollment-title:focus, #enroll-result-title:focus { outline: none; }
@media (max-width: 900px) {
  .client-download { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 700px) {
  .workspace.authenticated, .workspace.sidebar-collapsed { grid-template-columns: 60px minmax(0, 1fr); }
  .sidebar { padding: 16px 6px; width: 244px; box-shadow: 8px 0 24px #48006b20; }
  .sidebar-collapsed .sidebar { width: 60px; box-shadow: none; }
  .sidebar-top { gap: 12px; }
  .sidebar-collapsed .nav-link { padding: 12px 0; }
  .workspace.authenticated main { padding: 0 12px; }
  .toolbar { gap: 8px; }
  .toolbar-end { gap: 4px; flex-wrap: wrap; }
  .toolbar button { padding: 9px; font-size: 12px; }
  .card { padding: 18px; }
  .client-download { padding: 14px; }
  .client-download button { width: 100%; font-size: 13px; }
  #servers-view .empty-state { padding: 28px 16px; }
}

.catalog-table input { min-width: 160px; font-size: 13px; font-family: ui-monospace, monospace; }
.catalog-table th { white-space: nowrap; }
.catalog-actions { margin-top: 20px; }
#catalog-message { color: #a02c23; }
#catalog-message.success { color: #146542; }
#catalog-message:empty { display: none; }
