* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #0c0c0c;
  color: #f4f4f4;
}
a { color: inherit; }
button, input, textarea, select {
  font: inherit;
}
.app {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
}
.sidebar {
  background: #050505;
  border-right: 1px solid #2a2a2a;
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
.brand-mark {
  width: 44px;
  height: 44px;
  border: 1px solid #555;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-weight: 700;
  background: #111;
}
.brand-name {
  font-size: 1rem;
  font-weight: 700;
}
.brand-sub,
.eyebrow,
.muted,
.inline-note {
  color: #a9a9a9;
}
.nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.nav-item,
.ghost-btn,
.primary-btn,
.danger-btn,
.warning-btn {
  border: 1px solid #313131;
  background: #111;
  color: #f4f4f4;
  padding: 12px 14px;
  border-radius: 12px;
  text-align: left;
  cursor: pointer;
  transition: 160ms ease;
}
.nav-item:hover,
.ghost-btn:hover,
.primary-btn:hover,
.danger-btn:hover,
.warning-btn:hover {
  border-color: #6a6a6a;
  transform: translateY(-1px);
}
.nav-item.active {
  background: #f4f4f4;
  color: #0c0c0c;
  font-weight: 700;
}
.sidebar-footer {
  margin-top: auto;
}
.workspace {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
h1, h2, h3, h4, p {
  margin: 0;
}
h1 {
  font-size: 2rem;
  line-height: 1.1;
}
.panel {
  background: #111;
  border: 1px solid #2d2d2d;
  border-radius: 18px;
  padding: 18px;
}
.panel-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}
.panel-header h2 {
  font-size: 1.125rem;
}
.content-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 18px;
}
.span-12 { grid-column: span 12; }
.span-8 { grid-column: span 8; }
.span-6 { grid-column: span 6; }
.span-4 { grid-column: span 4; }
.span-3 { grid-column: span 3; }
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}
.kpi-card {
  background: #0b0b0b;
  border: 1px solid #252525;
  border-radius: 16px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.kpi-value {
  font-size: 1.75rem;
  font-weight: 800;
}
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 8px 12px;
  border: 1px solid currentColor;
  font-size: 0.875rem;
}
.status-green { color: #76d276; }
.status-red { color: #ff6262; }
.status-yellow-orange { color: #ffb347; }
.status-gray { color: #b3b3b3; }
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}
.table-wrap {
  overflow: auto;
  border: 1px solid #232323;
  border-radius: 14px;
}
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}
th, td {
  padding: 12px 14px;
  border-bottom: 1px solid #232323;
  vertical-align: top;
}
th {
  position: sticky;
  top: 0;
  background: #0f0f0f;
  text-align: left;
  font-size: 0.875rem;
  color: #bcbcbc;
}
tr:hover td {
  background: #141414;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
label {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
input, textarea, select {
  width: 100%;
  background: #080808;
  color: #f4f4f4;
  border: 1px solid #343434;
  border-radius: 12px;
  padding: 12px 14px;
}
textarea {
  min-height: 110px;
  resize: vertical;
}
.primary-btn {
  background: #f4f4f4;
  color: #0c0c0c;
  font-weight: 700;
}
.danger-btn {
  border-color: #7a2d2d;
  color: #ff7d7d;
}
.warning-btn {
  border-color: #7a5a22;
  color: #ffb347;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.inline-note {
  border: 1px solid #2d2d2d;
  border-radius: 12px;
  padding: 12px 14px;
  background: #0b0b0b;
}
.inline-note.danger {
  border-color: #742d2d;
  color: #ff9c9c;
}
.inline-note.warning {
  border-color: #6b5623;
  color: #ffc96d;
}
.split {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 18px;
}
.list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.list-item {
  border: 1px solid #252525;
  border-radius: 14px;
  padding: 14px;
  background: #0d0d0d;
}
.hidden {
  display: none !important;
}
.checkbox-row {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.checkbox-row input[type="checkbox"] {
  width: auto;
}
.form-inline {
  grid-template-columns: 1fr auto auto;
  align-items: end;
}
.small-hint {
  font-size: 0.8rem;
  margin-top: 4px;
}
.test-block {
  margin-bottom: 18px;
}
.test-block:last-child {
  margin-bottom: 0;
}
.test-block-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: #dcdcdc;
}
.list-item.test-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.field-help {
  font-size: 0.8125rem;
  line-height: 1.45;
  color: #9a9a9a;
  margin: 0;
}
label > .field-help {
  margin-top: 2px;
}
.guide-box {
  border: 1px solid #333;
  border-radius: 14px;
  padding: 14px 16px;
  background: #0a0a0a;
  margin-bottom: 16px;
}
.guide-title {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 10px;
  color: #e8e8e8;
}
.guide-list {
  margin: 0;
  padding-left: 1.25rem;
  color: #b0b0b0;
  font-size: 0.875rem;
  line-height: 1.5;
}
.guide-list li {
  margin-bottom: 6px;
}
.guide-list li:last-child {
  margin-bottom: 0;
}
details.field-details {
  margin-top: 6px;
  font-size: 0.8125rem;
  color: #a3a3a3;
}
details.field-details summary {
  cursor: pointer;
  color: #c9c9c9;
  user-select: none;
}
details.field-details summary:hover {
  color: #fff;
}
details.field-details .details-body {
  margin-top: 8px;
  padding-left: 0;
  border-left: 2px solid #3a3a3a;
  padding-left: 12px;
}
.login-hints {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #2d2d2d;
}
.panel-body > .guide-box:first-child {
  margin-top: 0;
}
@media (max-width: 1080px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { border-right: 0; border-bottom: 1px solid #2a2a2a; }
  .split { grid-template-columns: 1fr; }
  .content-grid { grid-template-columns: 1fr; }
  .span-12, .span-8, .span-6, .span-4, .span-3 { grid-column: auto; }
}
