@font-face {
  font-family: Manrope;
  src: url("/assets/assets/fonts/Manrope-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Manrope;
  src: url("/assets/assets/fonts/Manrope-Medium.ttf") format("truetype");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: Manrope;
  src: url("/assets/assets/fonts/Manrope-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: Manrope;
  src: url("/assets/assets/fonts/Manrope-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

#npi-news-root,
#npi-news-admin,
#npi-admin-dock,
.npi-article {
  font-family: Manrope, "Segoe UI", sans-serif;
  box-sizing: border-box;
}

#npi-news-root *,
#npi-news-admin *,
#npi-admin-dock *,
.npi-article * {
  box-sizing: border-box;
}

#npi-news-root {
  position: fixed;
  z-index: 2147483000;
  display: none;
  pointer-events: auto;
  color: #eaf2f8;
}

.npi-scroller {
  height: 100%;
  display: grid;
  grid-template-rows: minmax(0, 1fr) 34px;
  gap: 8px;
}

.npi-track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  height: 100%;
  scrollbar-width: thin;
  scrollbar-color: rgba(143, 176, 212, 0.55) transparent;
  padding-bottom: 2px;
}

.npi-track::-webkit-scrollbar {
  height: 6px;
}
.npi-track::-webkit-scrollbar-thumb {
  background: rgba(143, 176, 212, 0.55);
  border-radius: 99px;
}

.npi-card {
  flex: 0 0 300px;
  height: 100%;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  min-width: 220px;
  min-height: 0;
}

.npi-card .media {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 16px 16px 0 0;
  background: #12283a;
  flex: 0 0 auto;
}

.npi-card img,
.npi-card .ph {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.npi-card .ph {
  background:
    radial-gradient(circle at 20% 30%, rgba(143, 176, 212, 0.45), transparent 42%),
    linear-gradient(160deg, #1a3a52, #0c1924);
}

.npi-card .body {
  width: 100%;
  flex: 1;
  min-height: 0;
  margin-top: 0;
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: linear-gradient(180deg, rgba(18, 40, 58, 0.96), rgba(10, 24, 36, 0.98));
  border: 1px solid rgba(143, 176, 212, 0.28);
  border-top: 0;
  border-radius: 0 0 16px 16px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
}

.npi-card h3 {
  margin: 0;
  font-size: 15px;
  line-height: 1.3;
  font-weight: 600;
  color: #eaf2f8;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.npi-card p {
  margin: 0;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  color: rgba(188, 208, 225, 0.92);
  font-size: 13px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.npi-card a.more {
  align-self: flex-start;
  color: #b7d4ec;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: 1px solid rgba(183, 212, 236, 0.45);
}

.npi-card a.more:hover {
  color: #fff;
}

.npi-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.npi-controls button {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(143, 176, 212, 0.45);
  background: rgba(12, 28, 42, 0.72);
  color: #eaf2f8;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
}

.npi-controls button:hover {
  background: rgba(61, 111, 153, 0.85);
}

.npi-dots {
  display: flex;
  gap: 6px;
  margin-right: auto;
}

.npi-dots i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(234, 242, 248, 0.28);
  display: block;
}

.npi-dots i.on {
  background: #d5e6f5;
}

.npi-empty {
  height: 100%;
  display: flex;
  align-items: center;
  color: rgba(234, 242, 248, 0.72);
  letter-spacing: 0.04em;
}

#npi-admin-dock {
  position: fixed;
  z-index: 2147483001;
  display: none;
  flex-direction: column;
  gap: 6px;
}

#npi-admin-dock button {
  border: 1px solid rgba(143, 176, 212, 0.45);
  background: rgba(16, 36, 51, 0.94);
  color: #eaf2f8;
  border-radius: 10px;
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
}

#npi-admin-dock button.on,
#npi-admin-dock button:hover {
  background: #3d6f99;
}

#npi-news-admin {
  position: fixed;
  z-index: 2147483000;
  display: none;
  top: 16px;
  right: 16px;
  bottom: 16px;
  left: 240px;
  background: #f4f7fb;
  color: #102433;
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  overflow: hidden;
  flex-direction: column;
}

#npi-news-admin header.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  background: #102433;
  color: #eaf2f8;
}

#npi-news-admin header.bar h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

#npi-news-admin header.bar button,
.npi-btn {
  border: 0;
  border-radius: 10px;
  background: #3d6f99;
  color: #fff;
  padding: 8px 14px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
}

.npi-btn.ghost {
  background: transparent;
  color: #102433;
  border: 1px solid rgba(16, 36, 51, 0.2);
}

.npi-btn.warn {
  background: #8d3b3b;
}

#npi-news-admin .pane {
  flex: 1;
  overflow: auto;
  padding: 18px 20px 28px;
}

.npi-note,
.npi-error {
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.45;
  color: #3d5163;
}

.npi-error {
  color: #8d3b3b;
}

.npi-home-order {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}

.npi-home-order article {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid rgba(16, 36, 51, 0.08);
  border-radius: 12px;
  cursor: grab;
}

.npi-home-order article.over {
  border-color: #3d6f99;
}

.npi-home-order b {
  width: 28px;
  color: #3d6f99;
}

.npi-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
}

.npi-table th,
.npi-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(16, 36, 51, 0.08);
  vertical-align: top;
  font-size: 14px;
}

.npi-table th {
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #5d7284;
}

.npi-table tr.hidden td {
  opacity: 0.55;
}

.npi-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.npi-actions button {
  border: 1px solid rgba(16, 36, 51, 0.15);
  background: #fff;
  border-radius: 8px;
  padding: 4px 8px;
  cursor: pointer;
  font-family: inherit;
}

.npi-form {
  display: grid;
  gap: 12px;
  max-width: 860px;
}

.npi-form label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
}

.npi-form input[type="text"],
.npi-form input[type="number"],
.npi-form input[type="datetime-local"],
.npi-form textarea,
.npi-editor {
  width: 100%;
  border: 1px solid rgba(16, 36, 51, 0.16);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  background: #fff;
  color: #102433;
}

.npi-editor {
  min-height: 220px;
}

.npi-toolbar {
  display: flex;
  gap: 6px;
  margin-bottom: 6px;
}

.npi-toolbar button {
  border: 1px solid rgba(16, 36, 51, 0.16);
  background: #fff;
  border-radius: 8px;
  padding: 4px 8px;
  cursor: pointer;
  font-family: inherit;
}

.npi-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.npi-hint {
  font-weight: 400;
  color: #5d7284;
}

.npi-preview {
  width: min(100%, 420px);
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 12px;
  background: #d7e2ec;
}

.npi-row-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

body[data-page="news"] {
  margin: 0;
  background: #0c1924;
  color: #eaf2f8;
}

.npi-article {
  max-width: 880px;
  margin: 0 auto;
  padding: 28px 20px 64px;
}

.npi-article .back {
  color: #b7d4ec;
  text-decoration: none;
  font-weight: 600;
}

.npi-article h1 {
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.2;
  margin: 18px 0 10px;
}

.npi-article .meta {
  color: rgba(188, 208, 225, 0.8);
  margin-bottom: 18px;
}

.npi-article .hero {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 18px;
  background: #12283a;
  margin-bottom: 18px;
}

.npi-article .lead {
  font-size: 18px;
  line-height: 1.5;
  color: #d5e4f0;
}

.npi-article .content {
  font-size: 17px;
  line-height: 1.65;
}

.npi-article .content a {
  color: #b7d4ec;
}

@media (max-width: 760px) {
  #npi-news-admin {
    left: 12px;
    top: 72px;
  }
  .npi-card {
    flex-basis: min(300px, 78vw);
  }
}
