:root {
  --nx-bg: #f6f8fb;
  --nx-surface: #ffffff;
  --nx-surface-2: #eef4f8;
  --nx-ink: #14202b;
  --nx-muted: #64748b;
  --nx-line: #dbe4ec;
  --nx-primary: #0b6f8f;
  --nx-primary-2: #11a3b7;
  --nx-accent: #29b67f;
  --nx-accent-2: #f3b943;
  --nx-ai: #6d5dfc;
  --nx-danger: #d94848;
  --nx-radius: 8px;
  --nx-shadow: 0 18px 45px rgba(20, 32, 43, 0.11);
  --nx-font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(17, 163, 183, 0.08), rgba(246, 248, 251, 0) 320px),
    var(--nx-bg);
  color: var(--nx-ink);
  font-family: var(--nx-font);
}

a {
  color: var(--nx-primary);
  text-decoration: none;
}

a:hover {
  color: var(--nx-primary-2);
}

.nx-page {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 56px;
}

.nx-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 28px;
  align-items: stretch;
  padding: 28px;
  border: 1px solid rgba(219, 228, 236, 0.9);
  border-radius: var(--nx-radius);
  background:
    linear-gradient(135deg, rgba(11, 111, 143, 0.98), rgba(20, 32, 43, 0.96)),
    var(--nx-primary);
  box-shadow: var(--nx-shadow);
  color: #fff;
}

.nx-hero h1 {
  margin: 0;
  max-width: 760px;
  font-size: clamp(2rem, 4vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: 0;
}

.nx-hero p {
  max-width: 680px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 1.05rem;
  line-height: 1.7;
}

.nx-hero__panel {
  display: grid;
  align-content: center;
  gap: 14px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--nx-radius);
  background: rgba(255, 255, 255, 0.1);
}

.nx-ai-chip,
.nx-status-chip {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.nx-ai-chip::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--nx-accent);
  box-shadow: 0 0 0 5px rgba(41, 182, 127, 0.16);
}

.nx-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin: 24px 0 16px;
}

.nx-toolbar h2,
.nx-section-title {
  margin: 0;
  color: var(--nx-ink);
  font-size: 1.25rem;
  letter-spacing: 0;
}

.nx-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.nx-btn,
button.nx-btn,
input[type="submit"].nx-btn {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: var(--nx-radius);
  background: var(--nx-primary);
  color: #fff;
  font: 700 0.92rem/1 var(--nx-font);
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.nx-btn:hover {
  transform: translateY(-1px);
  background: var(--nx-primary-2);
  color: #fff;
  box-shadow: 0 10px 24px rgba(17, 163, 183, 0.22);
}

.nx-btn--ghost {
  border-color: var(--nx-line);
  background: var(--nx-surface);
  color: var(--nx-ink);
}

.nx-btn--ghost:hover {
  background: var(--nx-surface-2);
  color: var(--nx-primary);
  box-shadow: none;
}

.nx-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
}

.nx-card {
  grid-column: span 4;
  padding: 18px;
  border: 1px solid var(--nx-line);
  border-radius: var(--nx-radius);
  background: var(--nx-surface);
  box-shadow: 0 8px 24px rgba(20, 32, 43, 0.06);
}

.nx-card h3 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.nx-card p {
  margin: 0;
  color: var(--nx-muted);
  line-height: 1.6;
}

.nx-card--ai {
  border-color: rgba(109, 93, 252, 0.24);
  background:
    linear-gradient(135deg, rgba(109, 93, 252, 0.08), rgba(17, 163, 183, 0.05)),
    var(--nx-surface);
}

.nx-table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border: 1px solid var(--nx-line);
  border-radius: var(--nx-radius);
  background: var(--nx-surface);
}

.nx-table th,
.nx-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--nx-line);
  text-align: left;
  vertical-align: top;
}

.nx-table th {
  background: var(--nx-surface-2);
  color: var(--nx-muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.nx-table tr:last-child td {
  border-bottom: 0;
}

.nx-form {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--nx-line);
  border-radius: var(--nx-radius);
  background: var(--nx-surface);
}

.nx-field {
  display: grid;
  gap: 6px;
}

.nx-field label {
  color: var(--nx-ink);
  font-size: 0.86rem;
  font-weight: 800;
}

.nx-field input,
.nx-field select,
.nx-field textarea {
  width: 100%;
  box-sizing: border-box;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid var(--nx-line);
  border-radius: var(--nx-radius);
  background: #fff;
  color: var(--nx-ink);
  font: 0.95rem/1.4 var(--nx-font);
  outline: none;
}

.nx-field textarea {
  min-height: 120px;
  resize: vertical;
}

.nx-field input:focus,
.nx-field select:focus,
.nx-field textarea:focus {
  border-color: var(--nx-primary-2);
  box-shadow: 0 0 0 4px rgba(17, 163, 183, 0.13);
}

.nx-alert {
  padding: 12px 14px;
  border: 1px solid rgba(41, 182, 127, 0.26);
  border-radius: var(--nx-radius);
  background: rgba(41, 182, 127, 0.09);
  color: #126747;
  font-weight: 700;
}

.nx-empty {
  padding: 30px;
  border: 1px dashed var(--nx-line);
  border-radius: var(--nx-radius);
  background: rgba(255, 255, 255, 0.68);
  color: var(--nx-muted);
  text-align: center;
}

.nx-progress {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--nx-surface-2);
}

.nx-progress > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--nx-accent), var(--nx-primary-2), var(--nx-ai));
}

.nx-admin-menu-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 12px;
  border-radius: var(--nx-radius);
  color: #dbe8ef;
  font-weight: 700;
}

.nx-admin-menu-link:hover,
.nx-admin-menu-link.is-active {
  background: rgba(17, 163, 183, 0.14);
  color: #fff;
}

.nx-admin-menu-link::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 3px;
  background: linear-gradient(135deg, var(--nx-accent), var(--nx-primary-2));
}

@media (max-width: 860px) {
  .nx-page {
    width: min(100% - 20px, 1180px);
    padding-top: 18px;
  }

  .nx-hero {
    grid-template-columns: 1fr;
    padding: 20px;
  }

  .nx-card {
    grid-column: span 12;
  }
}