.nfc-filter-select {
    padding: 0.4rem 0.6rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--background);
    color: var(--foreground);
    font-size: 0.85rem;
    min-width: 160px;
}

.nfc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.nfc-table th {
    text-align: left;
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--muted-foreground);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid var(--border);
}

.nfc-table td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.nfc-table tbody tr:last-child td {
    border-bottom: none;
}

.nfc-table tbody tr:hover {
    background: var(--muted);
}

.nfc-badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
}

.nfc-badge-active {
    background: #dcfce7;
    color: #166534;
}

.nfc-badge-inactive {
    background: #fee2e2;
    color: #991b1b;
}

.nfc-badge-protected {
    background: #fef3c7;
    color: #92400e;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.modal-content {
    background: var(--bg-primary, #fff);
    border-radius: 12px;
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.form-error-banner {
    background: rgba(239, 68, 68, 0.08);
    color: #ef4444;
    padding: 0.625rem 0.875rem;
    border-radius: 8px;
    font-size: 0.8rem;
    border: 1px solid rgba(239, 68, 68, 0.15);
}

.btn-danger {
    background: #ef4444;
    color: #fff;
    border: 1px solid #ef4444;
}

.btn-danger:hover {
    background: #dc2626;
    border-color: #dc2626;
}

/* ── Inline style replacements ── */
.nfc-loading-body {
    text-align: center;
    padding: 3rem 2rem;
}

.nfc-card-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nfc-card-subtitle {
    font-size: 0.8rem;
    color: var(--muted-foreground);
    margin-top: 0.25rem;
}

.nfc-filter-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nfc-empty-state {
    text-align: center;
    padding: 3rem 0;
    color: var(--muted-foreground);
}

.nfc-empty-icon {
    opacity: 0.4;
    margin-bottom: 0.75rem;
}

.nfc-empty-title {
    margin: 0;
    font-size: 0.95rem;
}

.nfc-empty-hint {
    margin: 0.25rem 0 0;
    font-size: 0.8rem;
}

.nfc-cell-name {
    font-weight: 500;
}

.nfc-cell-description {
    font-size: 0.75rem;
    color: var(--muted-foreground);
}

.nfc-cell-uid {
    font-size: 0.7rem;
    color: var(--muted-foreground);
    font-family: monospace;
    margin-top: 0.2rem;
}

.nfc-cell-no-protection {
    color: var(--muted-foreground);
    font-size: 0.8rem;
}

.nfc-cell-last-tap {
    font-size: 0.8rem;
    color: var(--muted-foreground);
}

.nfc-cell-actions {
    display: flex;
    gap: 0.25rem;
    justify-content: flex-end;
}

.nfc-form-checkbox-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nfc-form-checkbox-label {
    margin: 0;
    font-weight: 500;
}

.nfc-delete-text {
    margin: 0;
    color: var(--muted-foreground);
    font-size: 0.875rem;
}

.nfc-delete-error {
    margin-top: 0.75rem;
    margin-bottom: 0;
}

/* ── Mobile table scroll ──────────────────────────────────────────────────── */
.dash-card-body:has(.nfc-table) {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.nfc-table {
    min-width: 600px;
}

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .nfc-filter-row {
        flex-wrap: wrap;
    }

    .nfc-filter-row input,
    .nfc-filter-row select {
        flex: 1 1 auto;
        min-width: 0;
    }

    .dash-card-header.nfc-card-header-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    /* Hide Write Protected (col 4) and Last Tap (col 5) */
    .nfc-table thead tr th:nth-child(4),
    .nfc-table thead tr th:nth-child(5),
    .nfc-table tbody tr td:nth-child(4),
    .nfc-table tbody tr td:nth-child(5) {
        display: none;
    }

    /* Bottom sheet modal */
    .modal-backdrop {
        align-items: flex-end;
        padding: 0;
    }

    .modal-content {
        border-radius: 16px 16px 0 0;
        max-height: 85vh;
        width: 100%;
        overflow-y: auto;
    }
}

@media (max-width: 640px) {
    /* Also hide Location (col 2) */
    .nfc-table thead tr th:nth-child(2),
    .nfc-table tbody tr td:nth-child(2) {
        display: none;
    }
}
