:root { font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial; }
body { margin: 0; background: #0b0f14; color: #e6edf3; }
a { color: inherit; }
.wrap { max-width: 980px; margin: 28px auto; padding: 0 16px; }
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo { width: 34px; height: 34px; border-radius: 10px; background: #2563eb; box-shadow: 0 8px 26px rgba(37,99,235,.35); }
.brand b { letter-spacing: .2px; }
.card { background: #111827; border: 1px solid #1f2937; border-radius: 16px; padding: 18px; box-shadow: 0 6px 24px rgba(0,0,0,.25); }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 900px) { .grid { grid-template-columns: 1fr; } }
h1 { margin: 0 0 8px; font-size: 26px; }
h2 { margin: 0 0 10px; font-size: 18px; }
p { margin: 8px 0; }
.muted { color: #9ca3af; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.field { display: grid; gap: 6px; margin: 12px 0; }
label { font-size: 12px; color: #9ca3af; }
input {
  width: 100%;
  background: #0b1220;
  border: 1px solid #263244;
  color: #e6edf3;
  border-radius: 12px;
  padding: 11px 12px;
  box-sizing: border-box;
}
button {
  background: #2563eb;
  color: white;
  border: 0;
  border-radius: 12px;
  padding: 11px 14px;
  cursor: pointer;
}
button:hover { filter: brightness(1.05); }
button.secondary { background: rgba(255,255,255,.08); }
button.danger { background: #dc2626; }
hr { border: 0; border-top: 1px solid #1f2937; margin: 14px 0; }
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid #263244; background: rgba(255,255,255,.04);
  padding: 6px 10px; border-radius: 999px; font-size: 12px;
}
.kpi { display: grid; gap: 4px; padding: 14px; border-radius: 14px; border: 1px solid #1f2937; background: rgba(255,255,255,.03); }
.kpi .v { font-size: 22px; font-weight: 700; }
.kpi .t { color: #9ca3af; font-size: 12px; }
.toast {
  margin-top: 12px;
  border: 1px solid #263244;
  background: rgba(255,255,255,.04);
  border-radius: 14px;
  padding: 12px;
  white-space: pre-wrap;
  word-break: break-word;
}
.footer { margin-top: 18px; color: #9ca3af; font-size: 12px; text-align: center; }
code { background: rgba(255,255,255,.06); padding: 2px 6px; border-radius: 10px; }

.wrap.narrow { max-width: 560px; }
.wrap.wide { max-width: 1100px; }

.hidden { display: none; }

.tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.tab-btn {
  background: rgba(255,255,255,.06);
  border: 1px solid #263244;
}

.tab-btn.active {
  background: #2563eb;
  border-color: #2563eb;
}

.meta-list {
  display: grid;
  gap: 10px;
}

.table-list {
  display: grid;
  gap: 10px;
}

.table-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid #1f2937;
  border-radius: 14px;
  background: rgba(255,255,255,.03);
}

.table-name {
  font-size: 16px;
  font-weight: 700;
}

.table-note {
  font-size: 12px;
}
.table-list {
  display: grid;
  gap: 12px;
}

.table-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 14px;
  border: 1px solid #1f2937;
  border-radius: 14px;
  background: rgba(255,255,255,.03);
}

.table-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
}

.table-subtitle {
  font-size: 12px;
}

.topbar-right {
  align-items: center;
}

.topbar-user {
  color: #cbd5e1;
  font-size: 14px;
  padding: 10px 12px;
  border: 1px solid #263244;
  border-radius: 12px;
  background: rgba(255,255,255,.04);
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.content-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}

.content-tile {
  text-align: left;
  padding: 18px;
  border: 1px solid #263244;
  border-radius: 16px;
  background: rgba(255,255,255,.03);
  cursor: pointer;
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}

.content-tile:hover {
  transform: translateY(-2px);
  border-color: #3b82f6;
  background: rgba(59,130,246,.08);
}

.content-tile-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.content-tile-description {
  font-size: 14px;
  color: #94a3b8;
  line-height: 1.45;
  min-height: 40px;
  margin-bottom: 14px;
}

.content-tile-count {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.content-tile-count-value {
  font-size: 24px;
  font-weight: 800;
}

.content-tile-count-label {
  font-size: 13px;
  color: #94a3b8;
}

.content-accordion {
  display: grid;
  gap: 12px;
}

.accordion-item {
  border: 1px solid #263244;
  border-radius: 16px;
  background: rgba(255,255,255,.03);
  overflow: hidden;
}

.accordion-header {
  width: 100%;
  border: none;
  background: transparent;
  color: inherit;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  cursor: pointer;
  text-align: left;
}

.accordion-title {
  font-size: 18px;
  font-weight: 700;
}

.accordion-body {
  border-top: 1px solid #1f2937;
  padding: 16px 18px 18px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.detail-card {
  border: 1px solid #1f2937;
  border-radius: 14px;
  padding: 12px;
  background: rgba(255,255,255,.02);
}

.detail-section {
  margin-top: 14px;
}

.detail-label {
  font-size: 12px;
  color: #94a3b8;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.detail-value {
  font-size: 14px;
  line-height: 1.5;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.content-text {
  white-space: pre-wrap;
  line-height: 1.6;
}

.content-pre {
  margin: 0;
  padding: 12px;
  border-radius: 12px;
  background: rgba(0,0,0,.25);
  overflow: auto;
  white-space: pre-wrap;
  line-height: 1.45;
}

.content-empty {
  color: #94a3b8;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  border: 1px solid #263244;
  font-size: 13px;
}

.status-switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  flex: 0 0 auto;
}

.status-switch input {
  display: none;
}

.status-slider {
  position: relative;
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: #475569;
  transition: background .15s ease;
  flex: 0 0 auto;
}

.status-slider::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: transform .15s ease;
}

.status-switch input:checked + .status-slider {
  background: #16a34a;
}

.status-switch input:checked + .status-slider::after {
  transform: translateX(18px);
}

.status-label {
  font-size: 14px;
  font-weight: 600;
  min-width: 92px;
  text-align: left;
  display: inline-block; 
}

.status-label-active {
  color: #22c55e;
}

.status-label-inactive {
  color: #ef4444;
}

.accordion-title-wrap {
  flex: 1 1 auto;
  min-width: 0;
}

.generic-card-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 14px;
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid #1f2937;
  font-size: 12px;
  color: #94a3b8;
  text-align: right;
}

.generic-meta-label {
  color: #64748b;
}

.detail-text-short {
  font-weight: 600;
  margin-bottom: 10px;
}

.detail-text-desc p {
  margin: 0 0 10px;
}

.detail-text-desc p:last-child {
  margin-bottom: 0;
}

.generic-card-footer-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 14px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid #1f2937;
  font-size: 12px;
  color: #94a3b8;
  text-align: right;
}