.nn-wrap {
    max-width: 1200px;
    color: #d0d0e0;
}

.nn-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.nn-header h1 {
    margin: 0;
    color: #fff;
    font-size: 22px;
}

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

/* Column grid — shared between header and every row */
.nn-table-header,
.nn-row {
    display: grid;
    grid-template-columns: 20px 160px 72px 52px 1fr 1fr 120px 160px;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
}

.nn-table-header {
    padding: 8px 12px;
    color: #55556a;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-bottom: 1px solid #1c1c28;
    margin-bottom: 6px;
}

/* Lists */
.nn-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Top-level item rows */
.nn-item > .nn-row {
    background: #16161f;
    border: 1px solid #1e1e2c;
    border-radius: 4px;
    min-height: 42px;
    margin-bottom: 3px;
    transition: border-color 0.1s;
}

.nn-item > .nn-row:hover {
    border-color: #2a2a3c;
}

/* Children */
.nn-children {
    padding-left: 16px;
    margin-top: 2px;
    margin-bottom: 2px;
}

.nn-child > .nn-row {
    background: #111119;
    border-color: #1a1a26;
}

.nn-child > .nn-row .nn-handle {
    margin-left: 8px;
}

.nn-child > .nn-row .nn-col-label {
    padding-left: 10px;
    color: #8888a0;
}

/* Drag handle — simple vertical bar */
.nn-col-handle {
    display: flex;
    align-items: center;
}

.nn-handle {
    width: 3px;
    height: 22px;
    background: #26263a;
    border-radius: 2px;
    cursor: grab;
    flex-shrink: 0;
}

.nn-handle:active {
    cursor: grabbing;
}

/* Drag placeholder */
.nn-placeholder {
    height: 42px;
    border: 2px dashed #252540;
    border-radius: 4px;
    margin-bottom: 3px;
    background: #0e0e16;
}

/* Columns */
.nn-col {
    overflow: hidden;
}

.nn-col-label {
    overflow: hidden;
}

.nn-input-label {
    font-size: 13px;
    font-weight: 500;
    color: #d0d0e0;
}

.nn-col-enabled {
    display: flex;
    align-items: center;
    justify-content: center;
}

.nn-enabled {
    width: 15px;
    height: 15px;
    cursor: pointer;
    accent-color: #3b5bdb;
}

.nn-col-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.nn-icon-box {
    width: 28px;
    height: 28px;
    border: 1px solid #1e1e2c;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.nn-icon-box img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

/* Icon edit popup */
#nn-icon-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

#nn-icon-overlay.open {
    display: flex;
}

#nn-icon-modal {
    background: #16161f;
    border: 1px solid #2a2a3c;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    width: 280px;
}

#nn-icon-preview {
    width: 64px;
    height: 64px;
    object-fit: contain;
}

#nn-icon-url-input {
    width: 100%;
    border-bottom: 1px solid #3b5bdb !important;
    padding: 4px 0;
}

/* Inline inputs */
.nn-input {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid transparent;
    color: #b0b0c8;
    font-size: 12px;
    padding: 2px 0;
    outline: none;
    transition: border-color 0.15s;
}

.nn-input:hover,
.nn-input:focus {
    border-bottom-color: #3b5bdb;
}

.nn-col-vis .nn-input {
    color: #6a6a88;
}

/* Operations */
.nn-col-ops {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Buttons */
.nn-btn {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    font-size: 12px;
    border-radius: 3px;
    border: 1px solid #28283a;
    background: #1c1c2c;
    color: #a0a0bc;
    cursor: pointer;
    white-space: nowrap;
    line-height: 1.5;
}

.nn-btn:hover {
    background: #232336;
    color: #d8d8f0;
    border-color: #323248;
}

.nn-btn-primary {
    background: #3b5bdb;
    color: #fff;
    border-color: #3b5bdb;
}

.nn-btn-primary:hover {
    background: #4a6ae8;
    border-color: #4a6ae8;
    color: #fff;
}

.nn-delete-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(220, 50, 50, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s;
}

.nn-delete-btn:hover {
    background: rgba(220, 50, 50, 0.35);
}

.nn-delete-btn img {
    width: 12px;
    height: 12px;
    opacity: 0.75;
}
