:root {
    --nt-bg: #0f0f10;
    --nt-panel: #161618;
    --nt-border: #26262a;
    --nt-text: #ececf1;
    --nt-muted: #a7a7b3;

    --nt-success: #25c27a;
    --nt-info: #3aa1ff;
    --nt-warning: #ffb020;
    --nt-error: #ff4d4f;

    --nt-accent: #ff0a54; /* przycisk konturowy */
    --nt-radius: 14px;
    --nt-softshadow: 0 6px 24px rgba(0, 0, 0, .35), 0 2px 6px rgba(0, 0, 0, .2);
}

.nt-main {
    background: var(--nt-bg);
    min-height: 60vh;
}

.nt-wrap {
    max-width: 900px;
    margin: 0 auto;
    padding: 32px 20px;
}

.nt-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.nt-head h1 {
    margin: 0;
    font-size: clamp(22px, 3vw, 32px);
    letter-spacing: .3px;
}

.nt-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nt-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.nt-filter label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.nt-filter input {
    width: 18px;
    height: 18px;
    accent-color: var(--nt-info);
}

.nt-select select {
    background: var(--nt-panel);
    color: var(--nt-text);
    border: 1px solid var(--nt-border);
    border-radius: 10px;
    padding: 10px 12px;
    outline: none;
}

.nt-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.nt-item {
    position: relative;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    background: var(--nt-panel);
    border: 1px solid var(--nt-border);
    border-radius: var(--nt-radius);
    padding: 16px 16px 14px 16px;
    box-shadow: var(--nt-softshadow);
    transition: transform .18s ease, border-color .2s ease, background .2s ease;
}

.nt-item:hover {
    transform: translateY(-1px);
    border-color: #34343a;
}

.nt-left {
    min-width: 0;
}

.nt-title {
    margin: 0;
    font-weight: 600;
    line-height: 1.25;
    word-break: break-word;
}

.nt-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 6px 0 8px;
}

.nt-pill {
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .2px;
    background: #222228;
    border: 1px solid var(--nt-border);
}

.nt-pill[data-type="filmy"] {
    color: #ff6f61;
    border-color: color-mix(in oklab, #ff6f61 40%, #222);
}

.nt-pill[data-type="zdjecia"] {
    color: #3aa1ff;
    border-color: color-mix(in oklab, #3aa1ff 40%, #222);
}

.nt-pill[data-type="sklep"] {
    color: #25c27a;
    border-color: color-mix(in oklab, #25c27a 40%, #222);
}

.nt-pill[data-type="forum"] {
    color: #ffb020;
    border-color: color-mix(in oklab, #ffb020 40%, #222);
}

.nt-pill[data-type="spolecznosci"] {
    color: #c586ff;
    border-color: color-mix(in oklab, #c586ff 40%, #222);
}

.nt-pill[data-type="administracja"] {
    color: #ff4d4f;
    border-color: color-mix(in oklab, #ff4d4f 40%, #222);
}


.nt-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--nt-info);
    box-shadow: 0 0 0 3px rgba(58, 161, 255, .15);
}

.nt-item.is-read .nt-dot {
    background: transparent;
    box-shadow: none;
    border: 1px solid var(--nt-border);
}

.nt-body {
    color: var(--nt-muted);
    line-height: 1.45;
    word-break: break-word;
}

.nt-time {
    color: var(--nt-muted);
    font-size: 12px;
    margin-top: 8px;
}

.nt-actions-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nt-actions-item .nt-btn-icon {
    opacity: .85;
}

.nt-item:hover .nt-actions-item .nt-btn-icon {
    opacity: 1;
}

.nt-empty {
    border: 1px dashed var(--nt-border);
    border-radius: var(--nt-radius);
    padding: 28px;
    text-align: center;
    color: var(--nt-muted);
    background: linear-gradient(180deg, #151517, #141416);
}

/* Buttons */
.nt-btn, .nt-btn-icon, .nt-btn-link, .nt-btn-outline {
    appearance: none;
    border: 1px solid var(--nt-border);
    background: var(--nt-panel);
    color: var(--nt-text);
    padding: 10px 14px;
    border-radius: 12px;
    cursor: pointer;
    transition: transform .15s ease, background .2s ease, border-color .2s ease, color .2s ease;
}

.nt-btn:disabled {
    opacity: .6;
    cursor: not-allowed;
}

.nt-btn:hover {
    background: #1b1b1f;
    transform: translateY(-1px);
}

.nt-btn-outline {
    border: 2px solid var(--nt-accent);
    color: var(--nt-text);
    background: transparent;
}

.nt-btn-outline:hover {
    background: color-mix(in oklab, var(--nt-accent) 12%, transparent);
}

.nt-btn-icon {
    padding: 8px 10px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.nt-btn-danger {
    border-color: color-mix(in oklab, var(--nt-error) 40%, #333);
}

.nt-btn-danger:hover {
    background: color-mix(in oklab, var(--nt-error) 12%, transparent);
}

.nt-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    text-decoration: none;
    color: var(--nt-info);
    border: 1px solid transparent;
    padding: 6px 8px;
    border-radius: 10px;
}

.nt-link:hover {
    border-color: color-mix(in oklab, var(--nt-info) 40%, #333);
    background: #17181b;
}

/* Pager */
.nt-pager {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 18px;
}

.nt-muted {
    color: var(--nt-muted);
    font-size: 13px;
}

/* Responsive */
@media (max-width: 640px) {
    .nt-actions-item {
        flex-direction: row;
    }

    .nt-head {
        align-items: flex-start;
        gap: 10px;
        flex-direction: column;
    }
}

/* --- MOBILE FIXES --- */
@media (max-width: 768px) {
    .nt-wrap {
        padding: 20px 14px;
    }

    .nt-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .nt-head h1 {
        font-size: clamp(20px, 5vw, 26px);
    }

    .nt-toolbar {
        flex-wrap: wrap;
        gap: 10px;
    }

    .nt-filter {
        width: 100%;
        order: 2;
    }

    .nt-select {
        width: 100%;
        order: 1;
    }

    .nt-select select {
        width: 100%;
        padding: 10px 12px;
    }

    .nt-list {
        gap: 12px;
    }

    .nt-item {
        flex-direction: column; /* lewa/prawa sekcja w kolumnie */
        padding: 14px;
        border-radius: 12px;
        gap: 12px;
    }

    .nt-meta {
        flex-wrap: wrap;
        gap: 8px;
    }

    .nt-pill {
        padding: 3px 8px;
        font-size: 11px;
    }

    .nt-time {
        margin-left: auto;
        font-size: 11px;
    }

    .nt-title {
        font-size: clamp(17px, 5vw, 22px);
    }

    .nt-body {
        font-size: 14px;
    }

    .nt-link {
        width: 100%;
        justify-content: center;
        padding: 8px 10px;
    }

    .nt-actions-item {
        width: 100%;
        justify-content: stretch;
        gap: 8px;
    }

    .nt-actions-item .nt-btn-icon {
        flex: 1 1 0; /* przyciski po 1/2 szerokości */
        justify-content: center;
        padding: 10px 12px;
    }

    .nt-pager {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }

    .nt-pager .nt-btn {
        width: 100%;
    }

    #pager-info {
        text-align: center;
    }
}

/* bardzo wąskie ekrany */
@media (max-width: 380px) {
    .nt-title {
        font-size: 18px;
    }

    .nt-body {
        font-size: 13px;
    }

    .nt-actions-item .nt-btn-icon {
        padding: 9px 10px;
    }
}

/* płynne przejścia elementów po zmianie stanu */
.nt-item {
    transition: transform .18s ease,
    border-color .25s ease,
    background .25s ease,
    opacity .3s ease,
    filter .3s ease;
}

/* kropka i pastylka też miękko gasną */
.nt-dot {
    transition: background .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.nt-pill {
    transition: color .25s ease, border-color .25s ease, background .25s ease;
}

/* efekt "wyciszenia" po oznaczeniu jako przeczytane */
.nt-item.is-read {
    background: #141416;
    filter: saturate(.75);
}

.nt-item.is-read .nt-title,
.nt-item.is-read .nt-body {
    opacity: .9;
    transition: opacity .25s ease;
}

/* --- PRZYCISK "Przeczytane": ripple + pop + kolor sukcesu --- */
.nt-btn-icon {
    position: relative;
    overflow: hidden; /* potrzebne do ripple */
    will-change: transform, background, border-color;
}

.nt-btn-icon::after {
    /* ripple */
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    transform: scale(0);
    opacity: 0;
    background: currentColor;
    transition: transform .45s ease, opacity .6s ease;
    pointer-events: none;
}

/* stan w trakcie (po kliknięciu, przed odpowiedzią) */
.nt-btn-icon.is-busy {
    border-color: color-mix(in oklab, var(--nt-info) 50%, #333);
}

.nt-btn-icon.is-busy::after {
    transform: scale(1.2);
    opacity: .12;
}

/* stan sukcesu – lekkie "popnięcie" i zielenie */
.nt-btn-icon.is-ok {
    color: var(--nt-success);
    border-color: color-mix(in oklab, var(--nt-success) 50%, #333);
    animation: nt-pop .24s ease;
}

@keyframes nt-pop {
    0% {
        transform: scale(1);
    }
    60% {
        transform: scale(1.06);
    }
    100% {
        transform: scale(1);
    }
}

/* rysowanie haczyka w SVG (tylko przy sukcesie) */
.nt-btn-icon.is-ok svg path {
    stroke-dasharray: 36;
    stroke-dashoffset: 36;
    animation: nt-check-draw .5s ease forwards;
}

@keyframes nt-check-draw {
    to {
        stroke-dashoffset: 0;
    }
}

/* disabled po sukcesie – zostawiamy zielony, ale wygaszamy interakcję */
.nt-btn-icon:disabled {
    opacity: .9;
    cursor: default;
}

/* subtelne flashnięcie tła kafelka przy sukcesie */
.nt-item.nt-flash {
    animation: nt-flash-bg .5s ease;
}

@keyframes nt-flash-bg {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 194, 122, .25);
    }
    100% {
        box-shadow: 0 0 0 12px rgba(37, 194, 122, 0);
    }
}

.nt-btn-icon.is-ok {
    background: color-mix(in oklab, var(--nt-success) 18%, transparent);
    color: var(--nt-success);
    border-color: color-mix(in oklab, var(--nt-success) 50%, #333);
}

.nt-btn-icon.is-ok:disabled {
    opacity: 1; /* pełna widoczność */
    cursor: default;
}

/* przeczytane przyciski na zielono */
.nt-btn-icon.is-ok {
    background: color-mix(in oklab, var(--nt-success) 18%, transparent);
    color: var(--nt-success);
    border-color: color-mix(in oklab, var(--nt-success) 50%, #333);
}

.nt-btn-icon.is-ok:disabled {
    opacity: 1;
    cursor: default;
}

.nt-input {
    width: 100%;
    background: var(--nt-panel);
    color: var(--nt-text);
    border: 1px solid var(--nt-border);
    border-radius: 12px;
    padding: 10px 12px;
    outline: none;
    transition: border-color .2s ease, background .2s ease;
}

.nt-input:focus {
    border-color: var(--nt-info);
    background: #1b1b1f;
}

.selfie-actions {
    display: flex;
    justify-content: center;
    align-items: center;   /* WYRÓWNA w pionie */
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.selfie-actions .nt-btn,
.selfie-actions .file-btn {
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 230px;
}





.selfie-actions .nt-input {
    max-width: 320px;
}

.nt-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-top: 10px;
}

.nt-scrollbox {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid var(--nt-border);
    border-radius: var(--nt-radius);
    padding: 12px;
    background: #141416;
}

.nt-scrollbox::-webkit-scrollbar {
    width: 8px;
}

.nt-scrollbox::-webkit-scrollbar-thumb {
    background: var(--nt-border);
    border-radius: 8px;
}

.selfie-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 14px;
}

/* Stylizacja przycisku pliku */
.file-upload {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border-radius: 12px;
    background: var(--nt-panel);
    border: 1px solid var(--nt-border);
    cursor: pointer;
    color: var(--nt-text);
    font-weight: 500;
    transition: background .2s ease, border-color .2s ease;
}

.file-upload:hover {
    background: #1b1b1f;
    border-color: var(--nt-info);
    color: var(--nt-info);
}

.file-upload input[type="file"] {
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}

.file-upload span {
    pointer-events: none;
}

.selfie-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 14px;
}

/* Stylizowany przycisk do uploadu */
.file-btn {
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.file-btn input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

/* Podgląd */
.selfie-preview {
    margin-top: 16px;
    text-align: center;
}

.selfie-preview img {
    max-width: 260px;
    border-radius: 12px;
    border: 1px solid var(--nt-border);
    box-shadow: var(--nt-softshadow);
}

/* subtelny podtytuł */
.nt-subtitle{ color:var(--nt-muted); font-size:15px; margin:4px 0 0; }

/* mniejsze, eleganckie tytuły sekcji (zamiast dużego .nt-title) */
.nt-title-sm{
    font-size:18px; font-weight:700; letter-spacing:.2px; margin:0 0 8px;
}

/* siatka dla social mediów */
.nt-grid{ display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:12px; margin-top:8px; }

/* styl inputów (spójnie z nt-*) */
.nt-input{
    width:100%; background:var(--nt-panel); color:var(--nt-text);
    border:1px solid var(--nt-border); border-radius:12px;
    padding:10px 12px; outline:none; transition:border-color .2s, background .2s;
}
.nt-input:focus{ border-color:var(--nt-info); background:#1b1b1f; }

/* radio – „Osoba prywatna / Firma” */
.nt-radio-group{ display:flex; gap:22px; align-items:center; margin-top:6px; }
.nt-radio-group label{ display:flex; align-items:center; gap:8px; cursor:pointer; color:var(--nt-text); }

/* selfie: PDF + upload wyśrodkowane */
.selfie-actions{ display:flex; justify-content:center; align-items:center; gap:14px; flex-wrap:wrap; margin-top:12px; }
.selfie-actions .nt-btn{ min-width:240px; justify-content:center; }

/* custom button dla file input */
.file-btn{ position:relative; overflow:hidden; cursor:pointer; }
.file-btn input[type="file"]{ position:absolute; inset:0; opacity:0; cursor:pointer; }

/* podgląd selfie */
.selfie-preview{ margin-top:14px; text-align:center; }
.selfie-preview img{
    max-width:280px; border-radius:14px; border:1px solid var(--nt-border); box-shadow:var(--nt-softshadow);
}

/* lekko mniejsze marginesy w kafelkach na desktopie */
@media (min-width: 900px){
    .nt-item{ padding:16px 18px 14px; }
}

.nt-note {
    font-size: 13px;
    color: var(--nt-muted);
    margin-top: 10px;
    line-height: 1.4;
}

.nt-success-box {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 40px 20px;
    margin: 0 auto;
    max-width: 700px;
}