:root {
  --graphen-black: #090b0e;
  --graphen-graphite: #20242a;
  --graphen-steel: #5e6670;
  --graphen-line: #d8dce1;
  --graphen-paper: #ffffff;
  --graphen-wash: #f4f5f6;
}

body.graphen-page { min-height: 100vh; color: #171a1f; background: #eceef0; }
.graphen-page .nv-graphen-link { background: #30353d; }
.graphen-loading-screen { background: radial-gradient(circle at 50% 42%, #2b3037 0, #111419 48%, #050607 100%) !important; }
.graphen-loading-screen .system-loading-core { gap: 0; }
.graphen-loading-screen .system-loading-title::before { color: #fff; letter-spacing: .035em; }
.graphen-loading-diamond {
  width: 66px;
  height: 66px;
  border: 2px solid #fff !important;
  border-radius: 4px !important;
  background: transparent !important;
  box-shadow: 0 0 0 1px rgba(255,255,255,.12), 0 24px 60px rgba(0,0,0,.4);
  transform: rotate(45deg);
  animation: graphenPulse 1.4s ease-in-out infinite !important;
}
.graphen-loading-diamond::after { content: ""; width: 22px; height: 22px; border: 1px solid #fff; transform: rotate(0); }
@keyframes graphenPulse { 0%,100% { opacity: .72; transform: rotate(45deg) scale(.94); } 50% { opacity: 1; transform: rotate(45deg) scale(1.03); } }

.graphen-shell { width: min(1600px, 100%); margin: 0 auto; padding: 28px clamp(18px, 3.5vw, 54px) 56px; }
.graphen-command {
  display: grid;
  grid-template-columns: auto minmax(280px, 1fr) auto;
  align-items: center;
  gap: 28px;
  min-height: 126px;
  padding: 24px 26px;
  color: #fff;
  background: var(--graphen-black);
  border: 1px solid #000;
  box-shadow: 0 18px 38px rgba(11, 15, 20, .18);
}
.graphen-brand-block { display: flex; align-items: center; gap: 17px; }
.graphen-mark, .graphen-empty-mark { display: block; width: 30px; height: 30px; flex: 0 0 auto; border: 2px solid currentColor; transform: rotate(45deg); }
.graphen-brand-block p, .graphen-section-heading p, .graphen-preview-heading > div > p { margin: 0 0 4px; color: #9ba3ad; font-size: 10px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.graphen-page .graphen-brand-block h1 { margin: 0; color: #fff !important; font-size: clamp(28px, 3vw, 42px); font-weight: 950; letter-spacing: .12em; line-height: 1; }
.graphen-command-copy { display: grid; gap: 5px; padding-left: 28px; border-left: 1px solid #353a42; }
.graphen-command-copy strong { font-size: 16px; }
.graphen-command-copy span { max-width: 700px; color: #adb4bd; font-size: 12px; line-height: 1.55; }
.graphen-primary, .graphen-secondary, .graphen-card-action {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 3px;
  font: 800 12px/1 var(--nv-font, Lato, Arial, sans-serif);
  cursor: pointer;
}
.graphen-primary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 17px; color: #101216; background: #fff; }
.graphen-primary:hover { background: #e8eaed; }
.graphen-primary:disabled, .graphen-secondary:disabled, .graphen-card-action:disabled { cursor: not-allowed; opacity: .48; }
.graphen-secondary { padding: 0 16px; color: #fff; background: var(--graphen-graphite); }

.graphen-filters {
  display: grid;
  grid-template-columns: minmax(240px, 1.5fr) minmax(180px, .8fr) minmax(150px, .55fr) minmax(150px, .55fr) auto;
  align-items: end;
  gap: 12px;
  padding: 18px 20px;
  border: 1px solid var(--graphen-line);
  border-top: 0;
  background: var(--graphen-paper);
}
.graphen-filters label { display: grid; gap: 7px; color: #454b53; font-size: 10px; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; }
.graphen-filters :is(input, select) { width: 100%; min-height: 42px; border: 1px solid #cbd0d6 !important; border-radius: 2px !important; color: #171a1f; background: #fff; font-size: 13px; }

.graphen-layout { display: grid; grid-template-columns: 390px minmax(0, 1fr); gap: 18px; margin-top: 18px; }
.graphen-catalog, .graphen-preview, .graphen-reports { border: 1px solid var(--graphen-line); background: var(--graphen-paper); }
.graphen-catalog { min-height: 650px; }
.graphen-section-heading { display: flex; min-height: 76px; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 18px; border-bottom: 1px solid var(--graphen-line); }
.graphen-section-heading p, .graphen-preview-heading > div > p { color: var(--graphen-steel); }
.graphen-section-heading h2, .graphen-preview-heading h2 { margin: 0; color: #171a1f; font-size: 18px; letter-spacing: -.02em; }
.graphen-section-heading > span { min-width: 34px; padding: 6px 8px; color: #fff; background: var(--graphen-black); font-size: 12px; font-weight: 900; text-align: center; }
.graphen-dataset-list { display: grid; max-height: 720px; overflow-y: auto; }
.graphen-dataset { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 15px 16px; border: 0; border-bottom: 1px solid #e6e8eb; color: inherit; background: #fff; text-align: left; }
.graphen-dataset:hover { background: #f6f7f8; }
.graphen-dataset.is-active { color: #fff; background: var(--graphen-graphite); }
.graphen-dataset > button:first-child { display: grid; gap: 3px; min-width: 0; padding: 0; border: 0; color: inherit; background: transparent; text-align: left; cursor: pointer; }
.graphen-dataset strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.graphen-dataset small { color: #68717c; font-size: 10px; text-transform: uppercase; }
.graphen-dataset.is-active small { color: #c5cad1; }
.graphen-card-action { grid-row: 1 / 3; grid-column: 2; width: 35px; min-height: 35px; align-self: center; border-color: #cfd4d9; color: #171a1f; background: #fff; }
.graphen-card-action:hover { border-color: #8e959e; background: #edf0f2; }
.graphen-dataset-empty { padding: 28px 18px; color: #68717c; font-size: 13px; text-align: center; }

.graphen-preview { min-width: 0; min-height: 650px; }
.graphen-preview-heading { display: flex; min-height: 112px; align-items: center; justify-content: space-between; gap: 22px; padding: 18px 20px; border-bottom: 1px solid var(--graphen-line); }
.graphen-preview-heading > div:first-child { min-width: 0; }
.graphen-preview-heading > div:first-child > span { display: block; max-width: 650px; margin-top: 6px; color: #68717c; font-size: 12px; line-height: 1.45; }
.graphen-metrics { display: flex; flex: 0 0 auto; border: 1px solid var(--graphen-line); }
.graphen-metrics > span { display: grid; min-width: 90px; gap: 3px; padding: 10px 12px; border-left: 1px solid var(--graphen-line); }
.graphen-metrics > span:first-child { border-left: 0; }
.graphen-metrics small { color: #6c737d; font-size: 9px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.graphen-metrics strong { overflow: hidden; max-width: 140px; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.graphen-status { min-height: 0; margin: 0; padding: 0 20px; color: #4f5862; font-size: 12px; }
.graphen-status:not(:empty) { padding-top: 11px; padding-bottom: 11px; border-bottom: 1px solid var(--graphen-line); background: #f6f7f8; }
.graphen-status.is-error { color: #8e1f2d; background: #fff1f2; }
.graphen-table-wrap { min-height: 535px; overflow: auto; }
.graphen-empty-state { display: grid; min-height: 535px; place-items: center; align-content: center; gap: 16px; padding: 40px; color: #5d6670; text-align: center; }
.graphen-empty-state .graphen-empty-mark { width: 42px; height: 42px; color: #171a1f; }
.graphen-empty-state strong { color: #171a1f; font-size: 18px; }
.graphen-empty-state p { max-width: 480px; margin: 0; font-size: 13px; line-height: 1.6; }
.graphen-table { width: 100%; min-width: 820px; border-collapse: collapse; font-size: 11px; }
.graphen-table th { position: sticky; z-index: 1; top: 0; padding: 11px 12px; border-right: 1px solid #3b4047; color: #fff; background: var(--graphen-graphite); font-size: 9px; font-weight: 900; letter-spacing: .05em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.graphen-table td { max-width: 290px; padding: 9px 12px; border-right: 1px solid #e3e5e8; border-bottom: 1px solid #e3e5e8; color: #262a30; vertical-align: top; overflow-wrap: anywhere; }
.graphen-table tr:nth-child(even) td { background: #f7f8f9; }
.graphen-table .is-number { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }

.graphen-reports { margin-top: 18px; }
.graphen-report-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.graphen-report-grid a { display: grid; min-height: 118px; align-content: center; gap: 4px; padding: 20px; border-right: 1px solid var(--graphen-line); border-bottom: 1px solid var(--graphen-line); color: #171a1f; text-decoration: none; }
.graphen-report-grid a:nth-child(3n) { border-right: 0; }
.graphen-report-grid a:hover { color: #fff; background: var(--graphen-graphite); }
.graphen-report-grid span { color: #737b85; font-size: 9px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.graphen-report-grid a:hover span { color: #c4c9cf; }
.graphen-report-grid strong { font-size: 15px; }
.graphen-report-grid small { color: #68717c; }
.graphen-report-grid a:hover small { color: #d1d5da; }

@media (max-width: 1120px) {
  .graphen-command { grid-template-columns: auto 1fr; }
  .graphen-command .graphen-primary { grid-column: 1 / -1; justify-self: stretch; }
  .graphen-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .graphen-filters .graphen-secondary { grid-column: 1 / -1; }
  .graphen-layout { grid-template-columns: 320px minmax(0, 1fr); }
  .graphen-preview-heading { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 800px) {
  .graphen-shell { padding: 18px 12px 40px; }
  .graphen-command { grid-template-columns: 1fr; gap: 18px; }
  .graphen-command-copy { padding: 16px 0 0; border-top: 1px solid #353a42; border-left: 0; }
  .graphen-command .graphen-primary { grid-column: auto; }
  .graphen-layout { grid-template-columns: 1fr; }
  .graphen-catalog { min-height: 0; }
  .graphen-dataset-list { max-height: 430px; }
  .graphen-report-grid { grid-template-columns: 1fr; }
  .graphen-report-grid a, .graphen-report-grid a:nth-child(3n) { border-right: 0; }
}
@media (max-width: 560px) {
  .graphen-filters { grid-template-columns: 1fr; }
  .graphen-filters .graphen-secondary { grid-column: auto; }
  .graphen-metrics { display: grid; width: 100%; grid-template-columns: repeat(3, 1fr); }
  .graphen-metrics > span { min-width: 0; border-top: 0; }
}
