/* LC Asset Registry — internal tool.
   Restrained light theme: hairlines, one accent, typography does the work. */

:root {
  --bg: #FFFFFF;
  --bg-soft: #FAFAFB;
  --bg-sink: #F4F4F6;
  --ink: #16181D;
  --ink-2: #5B6068;
  --ink-3: #71767E;
  --line: #E7E7EB;
  --line-soft: #F0F0F3;
  --accent: #0B6E7F;
  --accent-soft: #E9F5F7;
  --green: #1B7F4B;
  --amber: #8A6100;
  --red: #B42318;
  --font: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, system-ui, sans-serif;
  --mono: "SF Mono", ui-monospace, "Menlo", monospace;
  --radius: 8px;
  --shadow: 0 1px 2px rgba(16, 18, 22, 0.04), 0 8px 24px rgba(16, 18, 22, 0.06);
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button { font: inherit; color: inherit; }
h1, h2, h3, p, dl, dd, dt { margin: 0; }

/* ---------------------------------------------------------------- topbar */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 60px;
  padding: 0 28px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--line);
}

.topbar-left { display: flex; align-items: center; gap: 12px; min-width: 0; }

.wordmark {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.topbar-sep {
  width: 1px;
  height: 14px;
  background: var(--line);
}

.topbar-title {
  font-size: 13px;
  color: var(--ink-3);
  white-space: nowrap;
}

.topbar-right { display: flex; align-items: center; gap: 14px; }

.search {
  width: 260px;
  height: 34px;
  padding: 0 12px;
  font-size: 13px;
  color: var(--ink);
  background: var(--bg-sink);
  border: 1px solid transparent;
  border-radius: var(--radius);
  outline: none;
  transition: background 120ms ease, border-color 120ms ease;
}
.search::placeholder { color: var(--ink-3); }
.search:focus { background: #fff; border-color: var(--line); box-shadow: 0 0 0 3px rgba(11, 110, 127, 0.10); }

.user { font-size: 12.5px; color: var(--ink-3); }

.btn-quiet {
  background: none;
  border: 0;
  padding: 6px 2px;
  font-size: 12.5px;
  color: var(--ink-2);
  cursor: pointer;
  border-radius: 4px;
}
.btn-quiet:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* ---------------------------------------------------------------- layout */

body { transition: padding-right 180ms cubic-bezier(0.22, 1, 0.36, 1); }
body.panel-open { padding-right: min(540px, 100vw); }

.layout {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  max-width: 1280px;
  margin: 0 auto;
  align-items: start;
}

.rail {
  position: sticky;
  top: 60px;
  padding: 26px 20px 40px 28px;
}

.rail-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 10px;
}

.rail button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 7px 9px;
  margin-left: -9px;
  background: none;
  border: 0;
  border-radius: 6px;
  font-size: 13px;
  color: var(--ink-2);
  text-align: left;
  cursor: pointer;
}
.rail button:hover { background: var(--bg-sink); color: var(--ink); }
.rail button[aria-current="true"] { color: var(--ink); font-weight: 550; background: var(--bg-sink); }
.rail-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail-count { font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }

.main { padding: 26px 28px 80px; min-width: 0; }

/* ---------------------------------------------------------------- toolbar */

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 6px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.segmented {
  display: inline-flex;
  gap: 2px;
  padding: 2px;
  background: var(--bg-sink);
  border-radius: var(--radius);
}

.segmented button {
  padding: 6px 11px;
  border: 0;
  border-radius: 6px;
  background: none;
  font-size: 12.5px;
  color: var(--ink-2);
  cursor: pointer;
  white-space: nowrap;
}
.segmented button:hover { color: var(--ink); }
.segmented button[aria-pressed="true"] {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(16, 18, 22, 0.08);
}

.result-count { font-size: 12.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- rows */

.rows { list-style: none; margin: 0; padding: 0; }
.rows li { border-bottom: 1px solid var(--line-soft); border-radius: 6px; }
.rows li.sel { background: var(--bg-soft); }

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  padding: 15px 2px;
  background: none;
  border: 0;
  text-align: left;
  cursor: pointer;
}

.row:hover .row-name { color: var(--accent); }
.row[aria-selected="true"] .row-name { color: var(--accent); }

.row-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }

.row-name {
  font-size: 14.5px;
  font-weight: 550;
  letter-spacing: -0.005em;
  transition: color 100ms ease;
}

.row-summary {
  font-size: 13px;
  color: var(--ink-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 62ch;
}

.row-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
  white-space: nowrap;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--ink-2);
  width: 74px;
  flex-shrink: 0;
}

.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-3); }
.dot.live { background: var(--green); }
.dot.staging { background: var(--accent); }
.dot.dev { background: #C08A00; }
.dot.paused { background: var(--ink-3); }
.dot.broken { background: var(--red); }
.dot.retired { background: #C9CCD2; }

.owner { font-size: 12.5px; color: var(--ink-3); width: 104px; flex-shrink: 0; text-align: right; }

.badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 0.01em;
  color: var(--accent);
  background: var(--accent-soft);
}
.badge-muted { color: var(--ink-3); background: transparent; border: 1px solid var(--line); }
.badge-warn { color: var(--amber); background: #FDF6E3; }

.empty { padding: 48px 2px; color: var(--ink-3); font-size: 13.5px; }

/* ---------------------------------------------------------------- panel */

.panel-scrim {
  position: fixed;
  inset: 0;
  background: rgba(16, 18, 22, 0.34);
  z-index: 30;
  animation: fade 120ms ease;
}

.panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(540px, 100vw);
  background: #fff;
  border-left: 1px solid var(--line);
  z-index: 40;
  display: flex;
  flex-direction: column;
  box-shadow: -12px 0 40px rgba(16, 18, 22, 0.10);
  animation: slide 160ms cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes slide { from { transform: translateX(16px); opacity: 0.6; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 26px 18px;
}

.panel-head-text { min-width: 0; }

.eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-bottom: 8px;
}

.panel-head h2 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.panel-summary { margin-top: 8px; font-size: 13.5px; color: var(--ink-2); }

.icon {
  border: 0;
  background: none;
  font-size: 22px;
  line-height: 1;
  color: var(--ink-3);
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
}
.icon:hover { color: var(--ink); background: var(--bg-sink); }

.panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 0 26px 26px;
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  border-radius: var(--radius);
}
.cta:hover { background: #095B69; }

.cta-muted {
  display: block;
  background: var(--bg-sink);
  color: var(--ink-2);
  cursor: default;
  font-weight: 500;
}

.cta-note {
  margin-top: 10px;
  font-size: 12px;
  color: var(--ink-2);
  font-family: var(--mono);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
  max-width: 100%;
}
.cta-note:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }

.verify-link {
  margin-left: 8px;
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 11.5px;
  color: var(--accent);
  cursor: pointer;
  white-space: nowrap;
}
.verify-link:hover { border-color: var(--accent); }
.verify-link:hover { text-decoration: underline; text-underline-offset: 2px; }

.facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 24px;
  margin: 26px 0 4px;
  padding: 20px 0;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

.facts dt {
  color: #5B6068;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 4px;
}

.facts dd { font-size: 13.5px; color: var(--ink); }
.facts dd .dot { margin-right: 6px; vertical-align: 1px; }

.block { padding: 20px 0 4px; }
.block h3 {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-bottom: 8px;
}
.block p { font-size: 13.5px; color: var(--ink-2); max-width: 60ch; }

.tech { margin-top: 18px; border-top: 1px solid var(--line-soft); padding-top: 16px; }
.tech summary {
  font-size: 12.5px;
  color: var(--ink-3);
  cursor: pointer;
  list-style: none;
}
.tech summary::-webkit-details-marker { display: none; }
.tech summary::before { content: "+ "; }
.tech[open] summary::before { content: "− "; }
.tech-row {
  display: flex;
  gap: 12px;
  padding: 8px 0;
  font-size: 12px;
  border-bottom: 1px solid var(--line-soft);
}
.tech-row span { color: var(--ink-3); min-width: 92px; }
.tech-row code { font-family: var(--mono); color: var(--ink-2); word-break: break-all; }

/* ---------------------------------------------------------------- edit */

.edit-area { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 22px 0 8px; border-top: 1px solid var(--line-soft); margin-top: 18px; }
.edit-row { display: flex; flex-direction: column; gap: 6px; }
.edit-row.wide { grid-column: 1 / -1; }
.edit-row label { font-size: 11px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-3); }

.edit-row input[type="text"],
.edit-row select,
.edit-row textarea {
  width: 100%;
  padding: 8px 10px;
  font-family: inherit;
  font-size: 13px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  outline: none;
}
.edit-row input[type="text"]:focus,
.edit-row select:focus,
.edit-row textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(11, 110, 127, 0.10); }
.edit-row textarea { resize: vertical; line-height: 1.5; }
.edit-row input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--accent); }

.panel-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 26px;
  border-top: 1px solid var(--line);
  background: var(--bg-soft);
}

.foot-right { display: flex; align-items: center; gap: 10px; }

.btn {
  padding: 8px 13px;
  font-size: 13px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
}
.btn:hover { border-color: #D3D4D9; }
.btn:disabled { opacity: 0.55; cursor: default; }

.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: #095B69; border-color: #095B69; }

.btn-wide { width: 100%; margin-top: 18px; }

.save-state { font-size: 12px; color: var(--ink-3); }

/* ---------------------------------------------------------------- login */

.login-body { background: var(--bg); }

.login {
  width: 340px;
  margin-left: clamp(24px, 9vw, 160px);
  padding-top: 16vh;
}

.login .wordmark { display: block; margin-bottom: 40px; }

.login h1 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.login-lead {
  margin-top: 8px;
  font-size: 13.5px;
  color: var(--ink-2);
}

.login-form { display: flex; flex-direction: column; margin-top: 28px; }

.login-form label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 6px;
}

.login-form input {
  height: 38px;
  padding: 0 11px;
  margin-bottom: 16px;
  font-size: 13.5px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  outline: none;
}
.login-form input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(11, 110, 127, 0.10); }

.login-error {
  min-height: 18px;
  font-size: 12.5px;
  color: var(--red);
}

.login-foot { margin-top: 32px; font-size: 11.5px; color: var(--ink-3); }

/* ---------------------------------------------------------------- responsive */

@media (max-width: 1180px) {
  body.panel-open { padding-right: 0; }
}

@media (max-width: 960px) {
  .layout { grid-template-columns: 1fr; }
  .rail {
    position: static;
    display: flex;
    gap: 4px;
    overflow-x: auto;
    padding: 14px 20px;
    border-bottom: 1px solid var(--line);
  }
  .rail-label { display: none; }
  .rail button { width: auto; margin-left: 0; white-space: nowrap; }
  .main { padding: 20px; }
  .row-meta { gap: 10px; }
  .owner { display: none; }
  .row-summary { max-width: 46ch; }
  .search { width: 160px; }
  .panel { width: 100vw; }
  .edit-area { grid-template-columns: 1fr; }
}
