:root {
  --jp-bg: #06111f;
  --jp-bg-soft: #0b1d31;
  --jp-panel: rgba(8, 22, 41, 0.84);
  --jp-panel-strong: rgba(11, 29, 51, 0.96);
  --jp-border: rgba(127, 203, 255, 0.18);
  --jp-text: #eff7ff;
  --jp-muted: #a8bed4;
  --jp-accent: #58d8ff;
  --jp-accent-2: #2eeac7;
  --jp-warn: #ffc46b;
  color-scheme: dark;
  font-family: "IBM Plex Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(46, 234, 199, 0.07), transparent 240px),
    linear-gradient(135deg, #06111f 0%, #082033 52%, #0a1727 100%);
  color: var(--jp-text);
}

button,
input,
textarea {
  font: inherit;
}

.jp-shell {
  width: min(1500px, calc(100vw - 36px));
  margin: 0 auto;
  padding: 24px 0 40px;
}

.jp-hero,
.jp-composer,
.jp-results {
  border: 1px solid var(--jp-border);
  background: var(--jp-panel);
  box-shadow: 0 24px 72px rgba(0, 0, 0, 0.24);
}

.jp-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: end;
  border-radius: 24px;
  padding: 26px 30px;
  margin-bottom: 18px;
}

.jp-brand {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  color: #d7f1ff;
  font-size: 40px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.jp-brand-dot {
  width: 25px;
  height: 25px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--jp-accent), var(--jp-accent-2));
  box-shadow: 0 0 24px rgba(88, 216, 255, 0.72);
}

.jp-hero h1,
.jp-section-head h2,
.jp-results h2 {
  margin: 0;
  line-height: 1.15;
  letter-spacing: 0;
}

.jp-hero h1 {
  font-size: 40px;
  max-width: 780px;
}

.jp-hero p,
.jp-section-head p,
.jp-results p,
.jp-empty p {
  margin: 10px 0 0;
  color: var(--jp-muted);
  line-height: 1.65;
}

.jp-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid rgba(127, 203, 255, 0.14);
  border-radius: 999px;
  background: rgba(5, 14, 28, 0.58);
  color: #ddecfb;
}

.jp-meta strong {
  color: white;
  margin-right: 4px;
}

.jp-composer,
.jp-results {
  border-radius: 24px;
  padding: 24px;
  margin-bottom: 18px;
}

.jp-section-head,
.jp-results-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 18px;
}

.jp-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.jp-actions-top {
  justify-content: flex-end;
  min-width: 300px;
}

.jp-input-grid {
  display: grid;
  gap: 16px;
  margin-bottom: 16px;
}

.jp-filter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.jp-filter-wide {
  grid-column: span 2;
}

.jp-filter-reason {
  grid-column: span 4;
}

.jp-panel {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 16px 18px;
  border: 1px solid rgba(127, 203, 255, 0.12);
  border-radius: 18px;
  background: rgba(5, 17, 33, 0.76);
}

.jp-panel span,
.jp-panel legend {
  color: #ddf2ff;
  font-weight: 700;
}

.jp-panel legend {
  padding: 0;
}

.jp-panel input[type="text"],
.jp-panel input[type="number"],
.jp-panel textarea {
  width: 100%;
  border: 1px solid rgba(127, 203, 255, 0.16);
  border-radius: 14px;
  background: rgba(4, 14, 27, 0.92);
  color: var(--jp-text);
  outline: none;
  padding: 12px 14px;
}

.jp-panel textarea {
  resize: vertical;
  min-height: 260px;
  line-height: 1.6;
}

.jp-panel input:focus,
.jp-panel textarea:focus {
  border-color: rgba(88, 216, 255, 0.56);
  box-shadow: 0 0 0 3px rgba(88, 216, 255, 0.10);
}

.jp-checks {
  display: flex;
  gap: 10px 14px;
  align-items: center;
  flex-wrap: wrap;
}

.jp-checks label {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  color: #d7e8f7;
  font-weight: 600;
}

.jp-checks input {
  width: 16px;
  height: 16px;
  accent-color: var(--jp-accent-2);
}

.jp-btn {
  border: 1px solid rgba(127, 203, 255, 0.18);
  border-radius: 999px;
  min-height: 42px;
  padding: 10px 18px;
  cursor: pointer;
  color: #eef8ff;
  background: rgba(8, 22, 41, 0.82);
  font-weight: 800;
}

.jp-btn-primary {
  color: #051320;
  border-color: transparent;
  background: linear-gradient(135deg, #35c9ff, #2eeac7);
}

.jp-btn-secondary {
  background: rgba(10, 31, 55, 0.95);
}

.jp-btn-ghost {
  background: rgba(4, 14, 27, 0.55);
}

.jp-loading {
  display: none;
  color: var(--jp-warn);
  font-weight: 700;
}

.htmx-request .jp-loading,
.jp-loading.htmx-request {
  display: inline-flex;
}

.jp-empty {
  min-height: 140px;
  display: grid;
  align-content: center;
  border: 1px dashed rgba(127, 203, 255, 0.20);
  border-radius: 18px;
  padding: 28px;
  background: rgba(5, 17, 33, 0.48);
}

.jp-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.jp-table-wrap {
  overflow-x: auto;
  padding-bottom: 4px;
}

.jp-table {
  width: 100%;
  min-width: 1120px;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0 8px;
}

.jp-table th {
  color: #9bdfff;
  text-align: left;
  font-size: 14px;
  padding: 0 10px 6px;
}

.jp-table td {
  vertical-align: top;
  padding: 14px 10px;
  background: var(--jp-panel-strong);
  border-top: 1px solid rgba(127, 203, 255, 0.07);
  border-bottom: 1px solid rgba(127, 203, 255, 0.07);
  line-height: 1.48;
  overflow-wrap: anywhere;
}

.jp-table td:first-child {
  border-left: 1px solid rgba(127, 203, 255, 0.07);
  border-radius: 14px 0 0 14px;
}

.jp-table td:last-child {
  border-right: 1px solid rgba(127, 203, 255, 0.07);
  border-radius: 0 14px 14px 0;
}

.jp-rank {
  width: 54px;
  text-align: center;
}

.jp-if {
  width: 64px;
  text-align: center;
}

.jp-jcr {
  width: 82px;
  text-align: center;
}

.jp-index {
  width: 90px;
  text-align: center;
}

.jp-zone {
  width: 128px;
  text-align: center;
}

.jp-name {
  font-weight: 800;
  color: white;
}

.jp-reason {
  width: 31%;
}

@media (max-width: 980px) {
  .jp-shell {
    width: min(100% - 24px, 1500px);
    padding-top: 12px;
  }

  .jp-hero,
  .jp-section-head,
  .jp-results-head {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .jp-hero h1 {
    font-size: 30px;
  }

  .jp-brand {
    font-size: 30px;
    gap: 14px;
  }

  .jp-brand-dot {
    width: 19px;
    height: 19px;
  }

  .jp-actions-top {
    justify-content: flex-start;
    min-width: 0;
  }

  .jp-filter-grid {
    grid-template-columns: 1fr;
  }

  .jp-filter-wide {
    grid-column: auto;
  }
}
