.nfp-floating-button {
    position: fixed;
    left: 22px;
    bottom: 22px;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: #1a237e;
    color: #fff;
    display: flex !important;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 24px;
    box-shadow: 0 8px 22px rgba(0,0,0,.22);
    z-index: 999999;
    transition: transform .2s ease, background .2s ease;
}

.nfp-floating-button:hover {
    transform: scale(1.08);
    background: #283593;
    color: #fff;
}

.nfp-page {
    max-width: min(1760px, calc(100vw - 32px));
    margin: 40px auto;
    padding: 0 18px;
}

.nfp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
    padding: 24px;
    border-radius: 18px;
    background: #f5f7fb;
    border: 1px solid #e4e8f0;
}

.nfp-user-head {
    display: flex;
    align-items: center;
    gap: 14px;
}

.nfp-avatar {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 3px 10px rgba(0,0,0,.14);
}

.nfp-header h1 {
    margin: 0 0 6px;
}

.nfp-header p {
    margin: 0;
}

.nfp-back-link,
.nfp-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border-radius: 999px;
    background: #1a237e;
    color: #fff;
    text-decoration: none;
    border: 0;
    cursor: pointer;
    font-weight: 700;
    line-height: 1.2;
}

.nfp-back-link:hover,
.nfp-button:hover {
    background: #283593;
    color: #fff;
    text-decoration: none;
}

.nfp-button-light {
    background: #eef2ff;
    color: #1a237e;
}

.nfp-button-light:hover {
    background: #dfe5ff;
    color: #1a237e;
}

.nfp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.nfp-tile {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 135px;
    padding: 22px;
    border-radius: 18px;
    background: #fff;
    color: #1f2937;
    border: 1px solid #e5e7eb;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(0,0,0,.06);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.nfp-tile:hover,
.nfp-tile.is-active {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(0,0,0,.1);
    border-color: #1a237e;
}

.nfp-tile span {
    font-size: 32px;
}

.nfp-tile strong {
    font-size: 19px;
}

.nfp-tile small {
    color: #667085;
}

.nfp-card {
    padding: 24px;
    border-radius: 18px;
    background: #fff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 14px rgba(0,0,0,.06);
}

.nfp-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 20px;
}

.nfp-section-head h2 {
    margin: 0 0 6px;
}

.nfp-section-head p,
.nfp-help {
    margin: 0;
    color: #667085;
}

.nfp-notice {
    margin: 0 0 18px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid #bbf7d0;
    background: #f0fdf4;
    color: #166534;
}

.nfp-notice-error {
    border-color: #fecaca;
    background: #fef2f2;
    color: #991b1b;
}

.nfp-table-wrap {
    overflow-x: auto;
}

.nfp-table {
    width: 100%;
    border-collapse: collapse;
}

.nfp-table th,
.nfp-table td {
    padding: 12px 10px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
    vertical-align: middle;
}

.nfp-table th {
    background: #f8fafc;
    color: #344054;
}

.nfp-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.nfp-actions a {
    color: #1a237e;
    font-weight: 700;
    text-decoration: none;
}

.nfp-form {
    display: grid;
    gap: 16px;
}

.nfp-form label {
    display: grid;
    gap: 7px;
    font-weight: 700;
    color: #344054;
}

.nfp-form input[type="text"],
.nfp-form input[type="file"],
.nfp-form textarea,
.nfp-form select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d0d5dd;
    border-radius: 12px;
    font: inherit;
    background: #fff;
}

.nfp-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.nfp-options-box {
    display: grid;
    gap: 10px;
    margin: 18px 0;
    padding: 16px;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: #f8fafc;
}

.nfp-check {
    display: flex !important;
    grid-template-columns: none !important;
    align-items: flex-start;
    gap: 10px !important;
    font-weight: 600 !important;
}

.nfp-check input {
    margin-top: 4px;
}

.nfp-check small {
    display: block;
    margin-top: 2px;
    color: #667085;
    font-weight: 400;
}

.nfp-editor-wrap {
    border: 1px solid #d0d5dd;
    border-radius: 14px;
    overflow: hidden;
}

.nfp-current-thumb img {
    max-width: 220px;
    height: auto;
    border-radius: 14px;
    border: 1px solid #e5e7eb;
}

@media (max-width: 700px) {
    .nfp-header,
    .nfp-section-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .nfp-user-head {
        align-items: flex-start;
    }

    .nfp-form-grid {
        grid-template-columns: 1fr;
    }

    .nfp-floating-button {
        left: 14px;
        bottom: 72px;
        width: 48px;
        height: 48px;
        font-size: 22px;
        z-index: 999999;
    }
}

.nfp-page.is-editor-page {
    max-width: min(1760px, calc(100vw - 32px));
}

.nfp-page.is-editor-page .nfp-card {
    padding: clamp(16px, 2vw, 28px);
}

.nfp-page.is-editor-page .nfp-editor-wrap {
    resize: horizontal;
    min-width: min(100%, 720px);
    max-width: 100%;
}

.nfp-editor-wrap .wp-editor-wrap,
.nfp-editor-wrap .wp-editor-container,
.nfp-editor-wrap iframe,
.nfp-editor-wrap textarea {
    max-width: 100%;
}

.nfp-dependent-box {
    margin: -2px 0 6px 34px;
    padding: 12px;
    border-left: 3px solid #c7d2fe;
    background: #fff;
    border-radius: 12px;
}

.nfp-dependent-box.is-hidden {
    display: none;
}

.nfp-separator {
    margin: 28px 0;
    border: 0;
    border-top: 1px solid #e5e7eb;
}

.nfp-contest-entries {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.nfp-contest-entry {
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #f8fafc;
}

.nfp-contest-entry img {
    display: block;
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 10px;
    margin: 8px 0;
}


/* v0.7.0: szerszy formularz posta i kafelkowy układ edycji */
.nfp-page.is-editor-page,
.nfp-page:has(.nfp-post-form) {
    max-width: min(1800px, calc(100vw - 32px));
}

.nfp-post-form {
    display: block;
}

.nfp-post-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
    gap: 22px;
    align-items: start;
}

.nfp-post-main,
.nfp-post-side {
    min-width: 0;
}

.nfp-post-side {
    display: grid;
    gap: 16px;
    position: sticky;
    top: 18px;
}

.nfp-form-card {
    display: grid;
    gap: 14px;
    padding: 18px;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 4px 14px rgba(0,0,0,.045);
}

.nfp-form-card h3 {
    margin: 0 0 4px;
    font-size: 18px;
    color: #111827;
}

.nfp-form-card-main {
    min-height: 720px;
}

.nfp-post-form .nfp-editor-wrap {
    width: 100%;
    min-width: 0 !important;
    max-width: none !important;
    resize: vertical;
}

.nfp-post-form .wp-editor-wrap,
.nfp-post-form .wp-editor-container,
.nfp-post-form iframe,
.nfp-post-form textarea,
.nfp-post-form .mce-tinymce,
.nfp-post-form .mce-container,
.nfp-post-form .mce-panel {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
}

.nfp-post-form textarea[name="post_excerpt"] {
    min-height: 112px;
    resize: vertical;
}

.nfp-button-wide {
    width: 100%;
}

.nfp-save-card {
    background: #f8fafc;
}

@media (min-width: 1280px) {
    .nfp-post-layout {
        grid-template-columns: minmax(720px, 1fr) 430px;
    }
}

@media (min-width: 1540px) {
    .nfp-post-layout {
        grid-template-columns: minmax(900px, 1fr) 460px;
    }
}

@media (max-width: 980px) {
    .nfp-post-layout {
        grid-template-columns: 1fr;
    }

    .nfp-post-side {
        position: static;
    }

    .nfp-form-card-main {
        min-height: 0;
    }
}
