:root {
    --npd-bg: #f4f6f8;
    --npd-card: #ffffff;
    --npd-border: #d5dde3;
    --npd-text: #162027;
    --npd-muted: #5b6b78;
    --npd-accent: #0f766e;
    --npd-accent-soft: #d6f3ef;
    --npd-shadow: 0 14px 30px rgba(17, 35, 50, 0.09);
    --npd-radius: 16px;
}

.npd-admin-wrap {
    font-family: "Segoe UI", "Avenir Next", "Trebuchet MS", sans-serif;
    color: var(--npd-text);
    padding-right: 16px;
}

.npd-admin-hero {
    margin: 18px 0 20px;
    padding: 24px 28px;
    border: 1px solid var(--npd-border);
    border-radius: calc(var(--npd-radius) + 4px);
    background:
        radial-gradient(circle at 95% 18%, rgba(15, 118, 110, 0.2), transparent 45%),
        radial-gradient(circle at 12% 84%, rgba(217, 119, 6, 0.14), transparent 38%),
        linear-gradient(145deg, #f8fbfc 0%, #eef3f5 100%);
    box-shadow: var(--npd-shadow);
}

.npd-admin-hero-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.npd-admin-hero h1 {
    margin: 0;
    font-size: 29px;
    line-height: 1.2;
    letter-spacing: -0.02em;
    font-weight: 700;
    color: #102330;
}

.npd-admin-hero p {
    margin: 10px 0 0;
    max-width: 900px;
    color: var(--npd-muted);
    font-size: 14px;
    line-height: 1.6;
}

.npd-guide-open.button {
    border-radius: 999px;
    border: 1px solid #97b7bf;
    background: #ffffff;
    color: #1b3a47;
    min-height: 34px;
    padding: 0 14px;
    box-shadow: 0 4px 10px rgba(19, 41, 54, 0.08);
}

.npd-guide-open.button:hover {
    border-color: #6f98a3;
    background: #f4fbfd;
    color: #0f3d49;
}

.duplicate-post-options-container {
    margin-top: 0;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.npd-settings-form {
    position: relative;
    background: linear-gradient(180deg, #f9fbfc 0%, var(--npd-bg) 100%);
    border: 1px solid var(--npd-border);
    border-radius: calc(var(--npd-radius) + 4px);
    padding: 20px;
    box-shadow: var(--npd-shadow);
}

.npd-settings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(300px, 1fr));
    gap: 16px;
}

.npd-settings-card {
    position: relative;
    border: 1px solid var(--npd-border);
    border-radius: var(--npd-radius);
    padding: 18px 18px 16px;
    background: var(--npd-card);
    box-shadow: 0 8px 18px rgba(20, 35, 55, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.npd-settings-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(20, 35, 55, 0.11);
}

.npd-settings-card--wide {
    grid-column: 1 / -1;
}

.npd-settings-card h2 {
    margin: 0 0 14px;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 700;
    color: #0f3f44;
}

.npd-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.npd-card-label {
    margin: 0 0 10px;
    font-size: 13px;
    font-weight: 600;
    color: #2a3f4f;
}

.npd-check-text {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.npd-help-tip {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1px solid #8eb2bf;
    background: #e8f4f8;
    color: #0d5664;
    font-size: 11px;
    font-weight: 700;
    font-style: normal;
    line-height: 1;
    cursor: help;
    user-select: none;
    flex: 0 0 auto;
}

.npd-help-tip:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.35);
}

.npd-help-tip::after {
    content: attr(data-tip);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 10px);
    transform: translateX(-50%) translateY(4px);
    width: min(320px, 82vw);
    padding: 8px 10px;
    border-radius: 8px;
    background: #0f1f2b;
    color: #f2f7fa;
    font-size: 12px;
    line-height: 1.4;
    text-align: left;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.14s ease, transform 0.14s ease;
    z-index: 40;
}

.npd-help-tip::before {
    content: "";
    position: absolute;
    left: 50%;
    bottom: calc(100% + 4px);
    transform: translateX(-50%);
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #0f1f2b;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.14s ease;
    z-index: 41;
}

.npd-help-tip:hover::after,
.npd-help-tip:hover::before,
.npd-help-tip:focus::after,
.npd-help-tip:focus::before {
    opacity: 1;
    visibility: visible;
}

.npd-help-tip:hover::after,
.npd-help-tip:focus::after {
    transform: translateX(-50%) translateY(0);
}

.post-types-checkboxes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 8px 12px;
}

.npd-policy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 8px 12px;
}

.npd-check {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 8px 10px;
    border-radius: 10px;
    color: #1c2f3b;
    font-size: 13px;
    line-height: 1.35;
    transition: background-color 0.18s ease;
}

.npd-check:hover {
    background: #f1f6f8;
}

.npd-check input[type="checkbox"] {
    margin: 0;
    accent-color: var(--npd-accent);
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
}

.npd-check--toggle {
    margin-top: 12px;
    padding: 10px 12px;
    background: var(--npd-accent-soft);
    border: 1px solid #b9e7e1;
}

.npd-field-row {
    margin-top: 12px;
}

.npd-field-row label {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #2d4656;
}

.npd-premium-fieldset {
    margin: 0;
    padding: 0;
    border: 0;
    min-inline-size: 0;
}

.npd-premium-fieldset.is-locked {
    opacity: 0.58;
    pointer-events: none;
    user-select: none;
}

.npd-field-row select,
.npd-field-row input[type="number"] {
    width: 100%;
    max-width: 100%;
    min-height: 38px;
    border: 1px solid #b6c6d1;
    border-radius: 10px;
    background: #fbfdff;
    padding: 6px 10px;
    color: #1b2c39;
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.02);
}

.npd-field-row select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding-right: 34px;
    background-image:
        linear-gradient(45deg, transparent 50%, #6f8896 50%),
        linear-gradient(135deg, #6f8896 50%, transparent 50%);
    background-position:
        calc(100% - 16px) calc(50% - 2px),
        calc(100% - 10px) calc(50% - 2px);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
}

.npd-field-row select:focus,
.npd-field-row input[type="number"]:focus {
    border-color: var(--npd-accent);
    box-shadow: 0 0 0 1px var(--npd-accent);
    outline: none;
}

.npd-site-list {
    max-height: 210px;
    overflow: auto;
    border: 1px solid var(--npd-border);
    border-radius: 12px;
    padding: 8px;
    background: #f8fafb;
}

.npd-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px dashed #c5d2db;
}

.npd-actions .button.npd-save-button {
    min-height: 40px;
    border-radius: 12px;
    padding: 0 20px;
    border: 1px solid #0e6a63;
    background: linear-gradient(180deg, #179989 0%, #0f766e 100%);
    text-shadow: none;
    box-shadow: 0 10px 20px rgba(15, 118, 110, 0.28);
}

.npd-actions .button.npd-save-button:hover {
    background: linear-gradient(180deg, #1bad9d 0%, #118176 100%);
    border-color: #0d625c;
}

.npd-guide-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: none;
}

.npd-guide-modal.is-open {
    display: block;
}

.npd-guide-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 20, 32, 0.52);
    backdrop-filter: blur(2px);
}

.npd-guide-panel {
    position: relative;
    width: min(760px, calc(100vw - 36px));
    margin: 7vh auto;
    padding: 22px 22px 16px;
    border-radius: 16px;
    border: 1px solid #9fbbc5;
    background: linear-gradient(180deg, #ffffff 0%, #f4f9fb 100%);
    box-shadow: 0 24px 54px rgba(3, 18, 29, 0.28);
    color: #1a2e3c;
    max-height: 86vh;
    overflow: auto;
}

.npd-guide-panel h2 {
    margin: 0 0 8px;
    font-size: 20px;
    color: #0f2c3a;
}

.npd-guide-panel p {
    margin: 0 0 12px;
    color: #4e6170;
    font-size: 14px;
}

.npd-guide-panel ul {
    margin: 0;
    padding-left: 18px;
}

.npd-guide-panel li {
    margin-bottom: 10px;
    color: #213644;
}

.npd-guide-close {
    position: sticky;
    top: 0;
    float: right;
    border: 1px solid #b4c7d0;
    background: #ffffff;
    border-radius: 999px;
    height: 30px;
    padding: 0 12px;
    color: #2a4a59;
    cursor: pointer;
}

.npd-guide-close:hover {
    background: #ecf6f9;
}

.npd-guide-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 8px;
}

body.npd-modal-open {
    overflow: hidden;
}

.form-table {
    display: none;
}

@media (max-width: 1100px) {
    .npd-settings-grid {
        grid-template-columns: 1fr;
    }

    .npd-settings-card--wide {
        grid-column: auto;
    }
}

@media (max-width: 782px) {
    .npd-admin-wrap {
        padding-right: 0;
    }

    .npd-admin-hero,
    .npd-settings-form {
        padding: 16px;
        border-radius: 14px;
    }

    .npd-admin-hero h1 {
        font-size: 24px;
    }

    .npd-admin-hero-top {
        flex-direction: column;
        align-items: flex-start;
    }

    .npd-guide-panel {
        margin: 4vh auto;
        padding: 16px;
        width: min(760px, calc(100vw - 20px));
    }

    .npd-settings-card {
        padding: 14px;
    }
}
