.np-page {
    --np-red: #E30613;
    --np-red-dark: #C10510;
    --np-ink: #1a1a1a;
    min-height: 100vh;
    background: #fff7f7;
    color: var(--np-ink);
}

.np-header {
    background: #fff;
    border-bottom: 3px solid var(--np-red);
    padding: 14px 20px;
    box-shadow: 0 2px 10px rgba(227, 6, 19, 0.08);
}

.np-header-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.np-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--np-ink);
    font-weight: 700;
    font-size: 1.1rem;
}

.np-brand img {
    height: 40px;
    width: auto;
}

.np-brand:hover {
    color: var(--np-red);
}

.np-header-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.np-hero {
    max-width: 1100px;
    margin: 0 auto;
    padding: 36px 20px 8px;
    text-align: center;
}

.np-hero-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 14px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.6rem;
    background: linear-gradient(135deg, var(--np-red), var(--np-red-dark));
    box-shadow: 0 8px 22px rgba(227, 6, 19, 0.28);
}

.np-hero h1 {
    margin: 0 0 8px;
    font-size: 2rem;
    color: var(--np-ink);
}

.np-hero p {
    margin: 0 auto;
    max-width: 560px;
    color: #4b5563;
    line-height: 1.5;
}

.np-main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px 20px 64px;
}

.np-flash {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 16px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #ecfdf3;
    border: 1px solid #86efac;
    color: #166534;
}

.np-flash-error {
    background: #fef2f2;
    border-color: #fca5a5;
    color: #991b1b;
}

.np-admin-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 18px;
    padding: 12px 14px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid rgba(227, 6, 19, 0.28);
    box-shadow: 0 8px 24px rgba(35, 47, 62, 0.06);
}

.np-admin-bar p {
    margin: 0;
    color: #374151;
    font-size: 0.95rem;
}

.np-admin-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.np-tabs {
    display: flex;
    gap: 8px;
    margin: 8px 0 18px;
    padding: 6px;
    background: #fff;
    border-radius: 14px;
    border: 1px solid #e5e7eb;
    width: fit-content;
    max-width: 100%;
}

.np-tab {
    border: 0;
    background: transparent;
    color: #374151;
    font-weight: 700;
    padding: 10px 18px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.98rem;
}

.np-tab.is-active {
    background: var(--np-red);
    color: #fff;
}

.np-tab i {
    margin-right: 6px;
    color: var(--np-red);
}

.np-tab.is-active i {
    color: #fff;
}

.np-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 18px;
}

.np-card[hidden],
.np-empty[hidden] {
    display: none !important;
}

.np-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    box-shadow: 0 10px 28px rgba(35, 47, 62, 0.06);
    display: flex;
    flex-direction: column;
    min-height: 100%;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.np-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 34px rgba(35, 47, 62, 0.1);
}

.np-card-link {
    color: inherit;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.np-card-media {
    position: relative;
    aspect-ratio: 16 / 10;
    background: linear-gradient(135deg, var(--np-red), #9b0410);
    overflow: hidden;
}

.np-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.np-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.8);
    font-size: 2rem;
}

.np-pill {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--np-red);
    color: #fff;
    font-weight: 800;
    font-size: 0.85rem;
    padding: 4px 10px;
    border-radius: 999px;
}

.np-pill-inline {
    position: static;
    display: inline-block;
    margin-bottom: 8px;
}

.np-admin-actions form,
.np-card-tools form {
    margin: 0;
}

.np-card-body {
    padding: 14px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.np-card-body time {
    color: #6b7280;
    font-size: 0.82rem;
}

.np-card-body h2 {
    margin: 0;
    font-size: 1.15rem;
    line-height: 1.3;
    color: var(--np-ink);
}

.np-card-body p {
    margin: 0;
    color: #4b5563;
    line-height: 1.45;
    font-size: 0.95rem;
}

.np-card-tools {
    display: flex;
    gap: 8px;
    padding: 0 16px 14px;
}

.np-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 36px 16px;
    color: #6b7280;
    background: #fff;
    border-radius: 16px;
    border: 1px dashed #d1d5db;
}

.np-article {
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    box-shadow: 0 12px 32px rgba(35, 47, 62, 0.07);
}

.np-article-hero {
    position: relative;
    background: #9b0410;
    max-height: 460px;
    overflow: hidden;
}

.np-article-hero img {
    width: 100%;
    max-height: 460px;
    object-fit: cover;
    display: block;
}

.np-article-content {
    padding: 22px 22px 28px;
}

.np-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--np-red);
}

.np-article h1 {
    margin: 8px 0 8px;
    color: var(--np-ink);
    font-size: 1.9rem;
    line-height: 1.25;
}

.np-meta {
    color: #6b7280;
    font-size: 0.9rem;
    margin-bottom: 16px;
}

.np-body {
    white-space: pre-wrap;
    line-height: 1.65;
    font-size: 1.05rem;
    color: #1f2937;
}

.np-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
    margin-top: 22px;
}

.np-gallery button {
    padding: 0;
    border: 0;
    background: #111827;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 1;
}

.np-gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.np-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: var(--np-ink);
    font-weight: 700;
    text-decoration: none;
}

.np-back:hover {
    color: var(--np-red);
}

.np-form {
    background: #fff;
    border-radius: 18px;
    border: 1px solid #e5e7eb;
    padding: 22px;
    box-shadow: 0 12px 32px rgba(35, 47, 62, 0.06);
}

.np-form h1 {
    margin: 0 0 6px;
    color: var(--np-ink);
    font-size: 1.5rem;
}

.np-form-lead {
    margin: 0 0 18px;
    color: #6b7280;
}

.np-field {
    margin-bottom: 14px;
}

.np-field label {
    display: block;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--np-ink);
}

.np-field input[type="text"],
.np-field select,
.np-field textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    padding: 10px 12px;
    font: inherit;
    background: #fff;
}

.np-field textarea {
    min-height: 180px;
    resize: vertical;
}

.np-field input:focus,
.np-field select:focus,
.np-field textarea:focus {
    outline: 2px solid rgba(227, 6, 19, 0.35);
    border-color: var(--np-red);
}

.np-hint {
    margin: 6px 0 0;
    color: #6b7280;
    font-size: 0.85rem;
}

.np-existing {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 8px 0 18px;
}

.np-existing figure {
    margin: 0;
    width: 140px;
}

.np-existing img {
    width: 140px;
    height: 100px;
    object-fit: cover;
    border-radius: 10px;
    display: block;
    background: #111827;
}

.np-existing button {
    margin-top: 6px;
    width: 100%;
}

.np-form-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.np-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(17, 24, 39, 0.88);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 80;
    padding: 24px;
}

.np-lightbox[hidden] {
    display: none;
}

.np-lightbox img {
    max-width: min(1000px, 100%);
    max-height: 86vh;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

.np-lightbox-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 0;
    background: #fff;
    color: #111827;
    font-size: 1.4rem;
    cursor: pointer;
}

@media (max-width: 640px) {
    .np-hero h1,
    .np-article h1 {
        font-size: 1.5rem;
    }

    .np-tabs {
        width: 100%;
    }

    .np-tab {
        flex: 1;
    }

    .np-article-content,
    .np-form {
        padding: 16px;
    }
}

.np-page .btn-primary {
    background: var(--np-red);
    color: #fff;
    border: 2px solid var(--np-red);
    box-shadow: none;
}

.np-page .btn-primary:hover {
    background: var(--np-red-dark);
    border-color: var(--np-red-dark);
    box-shadow: 0 6px 16px rgba(227, 6, 19, 0.28);
}

.np-page .btn-secondary {
    background: #fff;
    color: var(--np-red);
    border: 2px solid var(--np-red);
}

.np-page .btn-secondary:hover {
    background: #fff1f1;
    color: var(--np-red-dark);
    border-color: var(--np-red-dark);
}
